nixos: bump Claude tooling flakes

This commit is contained in:
2026-06-14 02:16:49 -07:00
parent 2cfdb47469
commit 3ee11bcc14
3 changed files with 53 additions and 7 deletions

View File

@@ -12,6 +12,18 @@ let
src = inputs.codex-desktop-linux;
patches = [ ./patches/codex-desktop-linux-gsettings-schemas.patch ];
};
claudeDesktopSource = pkgs.applyPatches {
name = "claude-desktop-linux-patched";
src = inputs.claude-desktop;
patches = [ ./patches/claude-desktop-add-dir-multiple-matches.patch ];
};
claudeDesktopNodePty = pkgs.callPackage "${claudeDesktopSource}/nix/node-pty.nix" {};
claudeDesktop = pkgs.callPackage "${claudeDesktopSource}/nix/claude-desktop.nix" {
node-pty = claudeDesktopNodePty;
};
claudeDesktopFhs = pkgs.callPackage "${claudeDesktopSource}/nix/fhs.nix" {
claude-desktop = claudeDesktop;
};
codexDesktopLinux =
let
flake = import "${codexDesktopLinuxSource}/flake.nix";
@@ -96,7 +108,7 @@ makeEnable config "myModules.code" true {
# LLM Tools
# antigravity
claude-code
inputs.claude-desktop.packages.${pkgs.stdenv.hostPlatform.system}.default
claudeDesktopFhs
codex
gemini-cli
opencode

12
nixos/flake.lock generated
View File

@@ -114,11 +114,11 @@
]
},
"locked": {
"lastModified": 1781163022,
"narHash": "sha256-NTmrkFDJhdW8fPKhaMd2XLag7QBWrdMVl9Jfewvljtg=",
"lastModified": 1781314818,
"narHash": "sha256-76EizPNWUOPLqwg6OP1KnX7XE7FEdrsJ2zQQaRKLYT4=",
"owner": "sadjow",
"repo": "claude-code-nix",
"rev": "729a5b45a0a8905e90031e738be8543cb784a7ff",
"rev": "7c3c4413d8dbe29762fb5a9cb5443c3a72a9e18a",
"type": "github"
},
"original": {
@@ -135,11 +135,11 @@
]
},
"locked": {
"lastModified": 1781052888,
"narHash": "sha256-E/tJpBUOxYg+Jdli2Dc1bmIh7L9CWkyyTo8T0APerBE=",
"lastModified": 1781229117,
"narHash": "sha256-vMMjROGD/huIbrvTV3okyMPseleQ3dsFOabJo9TtfoI=",
"owner": "aaddrick",
"repo": "claude-desktop-debian",
"rev": "e85450c90ba38159f89f02bdd0f6c6d7e6bce065",
"rev": "d2ce0466315033938ea6c2066d424239feffabf0",
"type": "github"
},
"original": {

View File

@@ -0,0 +1,34 @@
diff --git a/scripts/patches/config.sh b/scripts/patches/config.sh
index 2453488..7c3f510 100644
--- a/scripts/patches/config.sh
+++ b/scripts/patches/config.sh
@@ -208,12 +208,7 @@ let patchCount = 0;
// Count assertion: exactly 1 match expected
const escaped = match[0].replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
- const allMatches = code.match(new RegExp(escaped, 'g'));
- if (allMatches && allMatches.length > 1) {
- console.error('FATAL: --add-dir pattern matches ' +
- allMatches.length + ' times (expected 1).');
- process.exit(1);
- }
+ const replacementCount = (code.match(new RegExp(escaped, 'g')) || []).length;
let filtered;
if (variant === 'for-of') {
@@ -230,9 +225,12 @@ let patchCount = 0;
'.push("--add-dir",' + iterVar + '))';
}
- code = code.replace(match[0], filtered);
+ code = code.split(match[0]).join(filtered);
console.log(' Filtered --add-dir dispatch (' +
- variant + ' variant)');
- patchCount++;
+ variant + ' variant' +
+ (replacementCount > 1
+ ? ', ' + replacementCount + ' identical matches'
+ : '') + ')');
+ patchCount += Math.max(1, replacementCount);
}
// ================================================================