Skip to content

Electron binary missing execute permissions (NixOS) #431

@Gratia64

Description

@Gratia64

Bug

The electron binary at $out/lib/claude-desktop/electron/electron is copied from electron-unwrapped but lacks execute permissions (644 instead of 755).

This causes claude-desktop to fail with exit code 126 (permission denied) on NixOS.

Location

In nix/claude-desktop.nix, the installPhase does:

cp ${electronDir}/electron $electron_tree/electron

But cp preserves permissions from the source, and electron-unwrapped's electron binary has 644 perms.

Fix

Add chmod after the cp:

cp ${electronDir}/electron $electron_tree/electron
chmod +x $electron_tree/electron

Environment

  • NixOS unstable (26.05.20260130)
  • claude-desktop-debian @ dca3044
  • Error: permission denied: .../electron/electron (exit 126)

Workaround

Overlay fix in user config:

claude-desktop = prev.claude-desktop.overrideAttrs (old: {
  postInstall = (old.postInstall or "") + ''
    chmod +x $out/lib/claude-desktop/electron/electron
  '';
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingformat: nixAffects Nix buildspriority: highImportant, should be addressed soontriage: investigatedIssue has been triaged and investigated

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions