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
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ Add the following to your `flake.nix`:
```nix
inputs.claude-desktop.url = "github:k3d3/claude-desktop-linux-flake";
inputs.claude-desktop.inputs.nixpkgs.follows = "nixpkgs";
inputs.claude-desktop.inputs.flake-utils.follows = "flake-utils";
```

And then the following package to your `environment.systemPackages` or `home.packages`:
Expand Down
34 changes: 0 additions & 34 deletions flake.lock

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

94 changes: 55 additions & 39 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,47 +3,63 @@

inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
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;
};
claude-desktop-with-fhs = pkgs.buildFHSEnv {
name = "claude-desktop";
targetPkgs = pkgs:
with pkgs; [
docker
glibc
openssl
nodejs
uv
outputs =
inputs:
let
inherit (inputs.nixpkgs) lib;
systems = [
"x86_64-linux"
"aarch64-linux"
];
eachSystem = lib.genAttrs systems;
pkgsFor = lib.genAttrs systems (
system:
import inputs.nixpkgs {
inherit system;
config.allowUnfreePredicate =
pkg:
builtins.elem (lib.getName pkg) [
"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/
}
);
in
{
packages = eachSystem (
system:
let
pkgs = pkgsFor.${system};
in
rec {
patchy-cnb = pkgs.callPackage ./pkgs/patchy-cnb.nix { };
claude-desktop = pkgs.callPackage ./pkgs/claude-desktop.nix {
inherit patchy-cnb;
};
claude-desktop-with-fhs = pkgs.buildFHSEnv {
name = "claude-desktop";
targetPkgs =
pkgs: with pkgs; [
docker
glibc
openssl
nodejs
uv
];
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/

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