Skip to content

fix: Deduplicate nix-shell inputs to fix "Argument list too long" error#573

Merged
sbernauer merged 1 commit intomainfrom
fix/nix-shell
Feb 19, 2026
Merged

fix: Deduplicate nix-shell inputs to fix "Argument list too long" error#573
sbernauer merged 1 commit intomainfrom
fix/nix-shell

Conversation

@sbernauer
Copy link
Member

@sbernauer sbernauer commented Feb 17, 2026

Fixes

➜  secret-operator git:(main) nix-shell
error: executing shell '/nix/store/5p86w1968gs5abgqkj9wv5gccxpy253c-bash-interactive-5.3p3/bin/bash': Argument list too long

The buildInputs and nativeBuildInputs lists were constructed by concatMapping over all transitive crate dependencies without deduplication. Since hundreds of crates share the same native build inputs (Rust compiler, linker, pkg-config, etc.), identical store paths were repeated hundreds of times, bloating PATH and other environment variables beyond the kernel's ARG_MAX limit.

Wrapping both lists with pkgs.lib.unique eliminates the duplicates and brings the environment size back within limits.

PS: Generated using Claude

@sbernauer sbernauer self-assigned this Feb 17, 2026
@sbernauer sbernauer moved this to Development: Waiting for Review in Stackable Engineering Feb 17, 2026
@Techassi Techassi moved this from Development: Waiting for Review to Development: In Review in Stackable Engineering Feb 19, 2026
@sbernauer sbernauer added this pull request to the merge queue Feb 19, 2026
@sbernauer sbernauer moved this from Development: In Review to Development: Done in Stackable Engineering Feb 19, 2026
Merged via the queue into main with commit 1a1ba74 Feb 19, 2026
2 checks passed
@sbernauer sbernauer deleted the fix/nix-shell branch February 19, 2026 08:44
@lfrancke lfrancke moved this from Development: Done to Done in Stackable Engineering Feb 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

2 participants