0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-19 16:40:32 +03:00

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.
This commit is contained in:
Tom Houlé 2022-10-04 12:09:52 +02:00
parent 877f90019a
commit a37017ffd6

View file

@ -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;