mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 16:11:58 +00:00
makeRustPlatform: allow to easily override stdenv
This commit is contained in:
parent
d917b8cdb3
commit
949c9f67cd
|
@ -1,6 +1,6 @@
|
|||
{ buildPackages, callPackage }:
|
||||
{ buildPackages, callPackage, stdenv }@prev:
|
||||
|
||||
{ rustc, cargo, ... }:
|
||||
{ rustc, cargo, stdenv ? prev.stdenv, ... }:
|
||||
|
||||
rec {
|
||||
rust = {
|
||||
|
@ -14,22 +14,22 @@ rec {
|
|||
|
||||
buildRustPackage = callPackage ../../../build-support/rust {
|
||||
git = buildPackages.gitMinimal;
|
||||
inherit cargoBuildHook cargoCheckHook cargoInstallHook cargoSetupHook
|
||||
inherit stdenv cargoBuildHook cargoCheckHook cargoInstallHook cargoSetupHook
|
||||
fetchCargoTarball importCargoLock rustc;
|
||||
};
|
||||
|
||||
importCargoLock = buildPackages.callPackage ../../../build-support/rust/import-cargo-lock.nix {};
|
||||
|
||||
rustcSrc = callPackage ./rust-src.nix {
|
||||
inherit rustc;
|
||||
inherit stdenv rustc;
|
||||
};
|
||||
|
||||
rustLibSrc = callPackage ./rust-lib-src.nix {
|
||||
inherit rustc;
|
||||
inherit stdenv rustc;
|
||||
};
|
||||
|
||||
# Hooks
|
||||
inherit (callPackage ../../../build-support/rust/hooks {
|
||||
inherit cargo rustc;
|
||||
inherit stdenv cargo rustc;
|
||||
}) cargoBuildHook cargoCheckHook cargoInstallHook cargoSetupHook maturinBuildHook;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue