buildRustPackage: remove git from nativeBuildInputs#206195
buildRustPackage: remove git from nativeBuildInputs#206195Atemu wants to merge 2 commits intoNixOS:stagingfrom
Conversation
Having git in nativeBuildInputs causes thousands of rebuilds when git is touched because every derivation that somehow transiently depends on a rust package will change. See NixOS#205682 for instance. AFAICT git is unused. Only the fetcher needs git which it has already. Fixes NixOS#205804
Cacert doesn't have any binary parts; it does not make sense to have it in nativeBuildInputs. Its home sould be buildInputs. It probably shouldn't be in there either as I can't imagine it being a general requirement for rust packages and any package that depends on cacert should do so explicitly. I don't have the experience with the rust packages set to know whether that's the case, so let's err on the side of caution.
| ]; | ||
|
|
||
| buildInputs = buildInputs | ||
| ++ [ cacert ] # FIXME Is this actually needed? |
There was a problem hiding this comment.
Does this even have an effect when its in buildInputs?
There was a problem hiding this comment.
Yes:
$ nix print-dev-env --impure --expr 'with import ./. {}; pkgsCross.riscv64.mkShell { buildInputs = [ cacert ]; }' | grep SSL
NIX_SSL_CERT_FILE='/nix/store/65wwvlzss9wsrsjwidrp2i0p0ps38nvg-nss-cacert-3.83/etc/ssl/certs/ca-bundle.crt'
export NIX_SSL_CERT_FILE
$ nix print-dev-env --impure --expr 'with import ./. {}; pkgsCross.riscv64.mkShell { }' | grep SSL
$
There was a problem hiding this comment.
@Mic92 asked the other way around, what should having it in nativeBuildInputs achieve?
AFAIK, the only distinction made is when cross-compiling where nativeBuildInputs are expected to run on the host while buildInputs are for the target.
Since you're here, do you know whether some rust packages need this env var to build a usable package? (Especially w.r.t. internet-facing ones.)
|
Removing |
Description of changes
Things done
sandbox = trueset innix.conf? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)nixos/doc/manual/md-to-db.shto update generated release notes