Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions pkgs/build-support/rust/build-rust-package/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
, stdenv
, callPackage
, cacert
, git
, cargoBuildHook
, cargoCheckHook
, cargoInstallHook
Expand Down Expand Up @@ -124,8 +123,6 @@ stdenv.mkDerivation ((removeAttrs args [ "depsExtraArgs" "cargoUpdateHook" "carg
inherit cargo-auditable;
})
] ++ [
cacert
git
cargoBuildHook
(if useNextest then cargoNextestHook else cargoCheckHook)
cargoInstallHook
Expand All @@ -134,6 +131,7 @@ stdenv.mkDerivation ((removeAttrs args [ "depsExtraArgs" "cargoUpdateHook" "carg
];

buildInputs = buildInputs
++ [ cacert ] # FIXME Is this actually needed?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this even have an effect when its in buildInputs?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

$

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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.)

++ lib.optionals stdenv.hostPlatform.isMinGW [ windows.pthreads ];

patches = cargoPatches ++ patches;
Expand Down
1 change: 0 additions & 1 deletion pkgs/development/compilers/rust/make-rust-platform.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ rec {
};

buildRustPackage = callPackage ../../../build-support/rust/build-rust-package {
git = buildPackages.gitMinimal;
inherit stdenv cargoBuildHook cargoCheckHook cargoInstallHook cargoNextestHook cargoSetupHook
fetchCargoTarball importCargoLock rustc;
};
Expand Down