From f17c3516fb298dc11890a358d25d0b652e7ac300 Mon Sep 17 00:00:00 2001 From: Bernardo Meurer Date: Tue, 26 Oct 2021 22:04:25 -0700 Subject: [PATCH] makeRustPlatform: allow to easily override stdenv --- .../compilers/rust/make-rust-platform.nix | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pkgs/development/compilers/rust/make-rust-platform.nix b/pkgs/development/compilers/rust/make-rust-platform.nix index b7379ac67720..baa29064e20c 100644 --- a/pkgs/development/compilers/rust/make-rust-platform.nix +++ b/pkgs/development/compilers/rust/make-rust-platform.nix @@ -1,6 +1,6 @@ -{ buildPackages, callPackage }: +{ buildPackages, callPackage, stdenv }@prev: -{ rustc, cargo, ... }: +{ rustc, cargo, stdenv ? prev.stdenv, ... }: rec { rust = { @@ -9,27 +9,27 @@ rec { fetchCargoTarball = buildPackages.callPackage ../../../build-support/rust/fetchCargoTarball.nix { git = buildPackages.gitMinimal; - inherit cargo; + inherit stdenv cargo; }; 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; }