Skip to content

fix(nix): move build tools from buildInputs to nativeBuildInputs#1047

Open
t4min0 wants to merge 1 commit intoRightNow-AI:mainfrom
t4min0:fix/nix-build-tools-native-build-inputs
Open

fix(nix): move build tools from buildInputs to nativeBuildInputs#1047
t4min0 wants to merge 1 commit intoRightNow-AI:mainfrom
t4min0:fix/nix-build-tools-native-build-inputs

Conversation

@t4min0
Copy link
Copy Markdown
Contributor

@t4min0 t4min0 commented Apr 12, 2026

Summary

perl, clang, and pkg-config are build-time tools that need to be on $PATH during cargo build. In Nix, nativeBuildInputs are added to $PATH; buildInputs are not (they go to $NIX_LDFLAGS for runtime linkage).

With perl in buildInputs, the openssl-sys vendored build fails when the flake is consumed as an input from another flake:

cargo:warning=configuring OpenSSL build: Command 'perl' not found.

openssl stays in buildInputs (runtime linkage). clang, perl, pkg-config move to nativeBuildInputs (build tools, need $PATH).

Follow-up to #966. Fixes #894 for flake consumers.

Changes

  • openssl: stays in buildInputs (runtime linkage dependency)
  • clang, perl, pkg-config: moved to new nativeBuildInputs (build-time tools that must be on $PATH)
  • No code changes, flake.nix only

Testing

  • cargo clippy --workspace --all-targets -- -D warnings passes
  • cargo test --workspace passes
  • Live integration tested (if applicable)

Security

  • No new unsafe code
  • No secrets or API keys in diff
  • User input validated at boundaries

perl, clang, and pkg-config are build-time tools that need to be on $PATH during cargo build. In Nix, nativeBuildInputs are added to $PATH; buildInputs are not (they go to $NIX_LDFLAGS for runtime linkage).

With perl in buildInputs, the openssl-sys vendored build fails when the flake is consumed as an input from another flake:

cargo:warning=configuring OpenSSL build: Command 'perl' not found.

openssl stays in buildInputs (runtime linkage). clang, perl, pkg-config move to nativeBuildInputs (build tools, need $PATH).

Follow-up to RightNow-AI#966. Fixes RightNow-AI#894 for flake consumers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] nix build fails on v0.5.4+: native-tls vendored feature requires perl missing from flake buildInputs

1 participant