about summary refs log tree commit diff
path: root/pkgs/development/compilers/rust
diff options
context:
space:
mode:
authorTom Houlé <tom@tomhoule.com>2022-10-04 12:09:52 +0200
committerTom Houlé <tom@tomhoule.com>2022-10-04 12:09:52 +0200
commita37017ffd60c740c28ca3f524679173f7b80b3d6 (patch)
tree2b7c1d5b8bb7c98a09f00e2297ddb50bb5c66779 /pkgs/development/compilers/rust
parent877f90019ab4ef6a6074862a016a55e55618c6e2 (diff)
downloadnixlib-a37017ffd60c740c28ca3f524679173f7b80b3d6.tar
nixlib-a37017ffd60c740c28ca3f524679173f7b80b3d6.tar.gz
nixlib-a37017ffd60c740c28ca3f524679173f7b80b3d6.tar.bz2
nixlib-a37017ffd60c740c28ca3f524679173f7b80b3d6.tar.lz
nixlib-a37017ffd60c740c28ca3f524679173f7b80b3d6.tar.xz
nixlib-a37017ffd60c740c28ca3f524679173f7b80b3d6.tar.zst
nixlib-a37017ffd60c740c28ca3f524679173f7b80b3d6.zip
makeRustPlatform: inherit cargo in import-cargo-lock
The main purpose of `makeRustPlatform` is to enable users to override
the `rustc` and `cargo` versions used by the `rustPlatform` derivations.

In all attributes of the result of `makeRustPlatform`, `rustc` and/or
`cargo` are overriden, except in `importCargoLock`. I think this is an
oversight / bug, and passing the received cargo derivation is the right
behaviour.

If `importCargoLock` always using the global cargo package even in
`makeRustPlatform` is the intended behaviour, I think it should be
documented at least in a comment.
Diffstat (limited to 'pkgs/development/compilers/rust')
-rw-r--r--pkgs/development/compilers/rust/make-rust-platform.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/development/compilers/rust/make-rust-platform.nix b/pkgs/development/compilers/rust/make-rust-platform.nix
index b859d01dc085..f210f8063cbd 100644
--- a/pkgs/development/compilers/rust/make-rust-platform.nix
+++ b/pkgs/development/compilers/rust/make-rust-platform.nix
@@ -18,7 +18,7 @@ rec {
       fetchCargoTarball importCargoLock rustc;
   };
 
-  importCargoLock = buildPackages.callPackage ../../../build-support/rust/import-cargo-lock.nix {};
+  importCargoLock = buildPackages.callPackage ../../../build-support/rust/import-cargo-lock.nix { inherit cargo; };
 
   rustcSrc = callPackage ./rust-src.nix {
     inherit runCommand rustc;