build: add claude-code to nix shell (#6101)

Signed-off-by: pyranota <pyra@duck.com>
This commit is contained in:
pyranota
2025-07-01 14:11:30 +02:00
committed by GitHub
parent a4c295b5e8
commit 626372954b
2 changed files with 27 additions and 2 deletions
Generated
+16
View File
@@ -33,6 +33,21 @@
"type": "indirect"
}
},
"nixpkgs-claude": {
"locked": {
"lastModified": 1751271578,
"narHash": "sha256-P/SQmKDu06x8yv7i0s8bvnnuJYkxVGBWLWHaU+tt4YY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "3016b4b15d13f3089db8a41ef937b13a9e33a8df",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-unstable",
"type": "indirect"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1736320768,
@@ -53,6 +68,7 @@
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs",
"nixpkgs-claude": "nixpkgs-claude",
"rust-overlay": "rust-overlay"
}
},
+11 -2
View File
@@ -3,9 +3,11 @@
nixpkgs.url = "nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
rust-overlay.url = "github:oxalica/rust-overlay";
# Use separate channel for claude code. It always needs to be latest
nixpkgs-claude.url = "nixpkgs/nixos-unstable";
};
outputs = { self, nixpkgs, flake-utils, rust-overlay }:
outputs = { self, nixpkgs, nixpkgs-claude, flake-utils, rust-overlay }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
@@ -13,6 +15,10 @@
config.allowUnfree = true;
overlays = [ (import rust-overlay) ];
};
claude-code = (import nixpkgs-claude {
inherit system;
config.allowUnfree = true;
}).claude-code;
lib = pkgs.lib;
stdenv = pkgs.stdenv;
rust = pkgs.rust-bin.stable.latest.default.override {
@@ -95,7 +101,10 @@
};
devShells.default = pkgs.mkShell {
buildInputs = buildInputs ++ (with pkgs; [
buildInputs = buildInputs ++ [
# To update run: `nix flake update nixpkgs-claude`
claude-code
] ++ (with pkgs; [
# Essentials
rust
cargo-watch