mirror of
https://github.com/aaddrick/claude-desktop-debian.git
synced 2026-05-17 08:36:35 +03:00
On NixOS, Electron and the app live in separate Nix store paths. When ELECTRON_FORCE_IS_PACKAGED=true, the app reads locale files (en-US.json) from process.resourcesPath at module load time — before frame-fix-wrapper.js can correct the path. Since resourcesPath is computed from /proc/self/exe (which resolves to electron-unwrapped's store path), the files aren't found and the app crashes with ENOENT. The fix copies the Electron ELF binary into a custom tree within the derivation, then merges both Electron's and the app's resources into the adjacent resources/ directory. Everything else (shared libs, .pak files, locales/) is symlinked to avoid duplication. This makes /proc/self/exe resolve to our tree, so resourcesPath naturally contains all needed files. Also enables ELECTRON_FORCE_IS_PACKAGED=true unconditionally for all package types, removing the 'nix' special case that kept NixOS running in development mode with debug logging and exposed IPC. Fixes #316 Co-Authored-By: Claude <claude@anthropic.com>