Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

103 changes: 67 additions & 36 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,44 +6,75 @@
flake-utils.url = "github:numtide/flake-utils";
};

outputs = {
self,
nixpkgs,
flake-utils,
}:
flake-utils.lib.eachSystem ["x86_64-linux" "aarch64-linux"] (system: let
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
};
in {
packages = rec {
patchy-cnb = pkgs.callPackage ./pkgs/patchy-cnb.nix {};
claude-desktop = pkgs.callPackage ./pkgs/claude-desktop.nix {
inherit patchy-cnb;
outputs =
{
self,
nixpkgs,
flake-utils,
}:
flake-utils.lib.eachSystem [ "x86_64-linux" "aarch64-linux" ] (
system:
let
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
};
claude-desktop-with-fhs = pkgs.buildFHSEnv {
name = "claude-desktop";
targetPkgs = pkgs:
with pkgs; [
docker
glibc
openssl
nodejs
uv
in
{
packages = rec {
node-pty = pkgs.callPackage ./pkgs/node-pty.nix { };

claude-desktop = pkgs.callPackage ./pkgs/claude-desktop.nix {
electron = pkgs.electron_40;
inherit node-pty;
};

claude-desktop-with-fhs = pkgs.symlinkJoin {
name = "claude-desktop-with-fhs";
paths = [
claude-desktop
(pkgs.buildFHSEnv {
name = "claude-desktop-bwrap";
targetPkgs =
pkgs: with pkgs; [
docker
glibc
openssl
nodejs
uv
glib
gvfs
xdg-utils
bubblewrap
];
runScript = "${claude-desktop}/bin/claude-desktop";
})
];
runScript = "${claude-desktop}/bin/claude-desktop";
extraInstallCommands = ''
# Copy desktop file from the claude-desktop package
mkdir -p $out/share/applications
cp ${claude-desktop}/share/applications/claude.desktop $out/share/applications/
postBuild = ''
rm -f $out/bin/claude-desktop
ln -sf $out/bin/claude-desktop-bwrap $out/bin/claude-desktop
'';
};

claude-desktop-shell = pkgs.buildFHSEnv {
name = "claude-desktop-shell";
targetPkgs =
pkgs: with pkgs; [
docker
glibc
openssl
nodejs
uv
glib
gvfs
xdg-utils
bubblewrap
];
runScript = "bash";
};

# Copy icons
mkdir -p $out/share/icons
cp -r ${claude-desktop}/share/icons/* $out/share/icons/
'';
default = claude-desktop;
};
default = claude-desktop;
};
});
}
);
}
Loading