Skip to content

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

Open
sbernauer wants to merge 1 commit intomainfrom
fix/nix-shell
Open

fix: Deduplicate nix-shell inputs to fix "Argument list too long" error#573
sbernauer wants to merge 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Development: Waiting for Review

Development

Successfully merging this pull request may close these issues.

1 participant