summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-22 16:16:54 +0000
committertv <tv@krebsco.de>2026-11-22 19:37:36 +0000
commitfb7987b41dc81e800bbdae7dd7313600b6c31428 (patch)
treea314613179ea393fc1074bf88a8fea1c6acc968a
parentbd384fe9cacec3361224e9e72a85994a5bf96caa (diff)
modules/claude-code: without alsa-lib
The wrapper puts alsa-lib on LD_LIBRARY_PATH, for voice input, which claude loads libasound for when asked to, and which is useless on a guest: an empty one instead, rather than null, which would leave an empty entry there, i.e. the current directory. ~7M less (alsa-lib, alsa-ucm-conf, alsa-topology-conf).
-rw-r--r--modules/claude-code.nix8
1 files changed, 7 insertions, 1 deletions
diff --git a/modules/claude-code.nix b/modules/claude-code.nix
index 11f7300..5a150a9 100644
--- a/modules/claude-code.nix
+++ b/modules/claude-code.nix
@@ -9,7 +9,13 @@
# package.
nixpkgs.overlays = [
(_: prev: {
- claude-code = prev.claude-code.overrideAttrs (_: rec {
+ # alsa-lib (and its data, ~7M) is for voice input only, which it
+ # loads when asked to, and which is useless here: an empty one, for
+ # the wrapper's LD_LIBRARY_PATH (null would make that an empty
+ # entry, i.e. the current directory).
+ claude-code = (prev.claude-code.override {
+ alsa-lib = prev.runCommand "no-alsa-lib" { } "mkdir -p $out/lib";
+ }).overrideAttrs (_: rec {
version = "2.1.329";
src = prev.fetchurl {
url = "https://registry.npmjs.org/@anthropic-ai/claude-code-linux-x64/-/claude-code-linux-x64-${version}.tgz";