The packages attrset referenced claude-desktop-fhs for the default
attribute, but without rec the name wasn't in scope. Move the
definition to the let block and use inherit instead.
Co-Authored-By: Claude <claude@anthropic.com>
Dynamically linked binaries downloaded at runtime (e.g., the Cowork CLI)
fail on NixOS because standard linker paths don't exist. The FHS package
wraps the app in a buildFHSEnv that provides these paths, fixing the
issue for all current and future downloaded binaries.
Users on non-NixOS distros using Nix can still explicitly select the
non-FHS package via `claude-desktop` if needed.
Fixes#355
Co-Authored-By: Claude <claude@anthropic.com>
The perSystem pkgs instance had no allowUnfree config, so consumers
using `inputs'.claude-desktop-debian.packages.claude-desktop` would
hit an unfree license error even if their own nixpkgs allows unfree.
Override _module.args.pkgs with allowUnfreePredicate for claude-desktop.
- Wire up --node-pty-dir flag in install_node_pty and finalize_app_asar
(was parsed but never used; nix builds had no node-pty binaries)
- Set electron_resources_dest for nix builds so process_icons has a
tray icon destination; update nix installPhase to match
- Remove unused lib param from fhs.nix
- Add missing source_dir global declaration
- Fix flake.nix whitespace
Co-Authored-By: Claude <claude@anthropic.com>
Build node-pty from source using buildNpmPackage so Claude Desktop's
terminal features (Claude Code) work on NixOS. The derivation handles
three issues with the upstream package:
- Strips macOS-only fsevents reference from package-lock.json so
npm ci doesn't fail on lock/json mismatch
- Runs both tsc (TypeScript to JS) and node-gyp rebuild (native addon)
- Copies build/Release/pty.node into output since npmInstallHook
doesn't include native addons
Also wires node-pty into claude-desktop.nix via --node-pty-dir flag
and updates the flake overlay to expose it.
Co-Authored-By: Claude <claude@anthropic.com>
Defines claude-desktop and claude-desktop-fhs packages for
x86_64-linux and aarch64-linux, plus an overlay for NixOS configs.
Co-Authored-By: Claude <claude@anthropic.com>