From fb7987b41dc81e800bbdae7dd7313600b6c31428 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 22 Nov 2026 16:16:54 +0000 Subject: 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). --- modules/claude-code.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'modules') 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"; -- cgit v1.3.1