diff --git a/pkgs/build-support/rust/hooks/default.nix b/pkgs/build-support/rust/hooks/default.nix index 0aebc064e44c4..d2e58e475533f 100644 --- a/pkgs/build-support/rust/hooks/default.nix +++ b/pkgs/build-support/rust/hooks/default.nix @@ -16,10 +16,6 @@ # from a stdenv platform (or a JSON file). , target ? stdenv.hostPlatform.rust.cargoShortTarget }: -let - inherit (python3) pythonOnBuildForHost; - pythonInterpreter = pythonOnBuildForHost.interpreter; -in { cargoBuildHook = callPackage ({ }: makeSetupHook { @@ -91,7 +87,7 @@ in ]; substitutions = { inherit (rust.envVars) rustTargetPlatformSpec setEnv; - pythonInterpreter = lib.versions.majorMinor pythonOnBuildForHost.version; + pythonExecutable = python3.executable; }; } ./maturin-build-hook.sh) {}; diff --git a/pkgs/build-support/rust/hooks/maturin-build-hook.sh b/pkgs/build-support/rust/hooks/maturin-build-hook.sh index 172104ee857a1..608857ed5b926 100644 --- a/pkgs/build-support/rust/hooks/maturin-build-hook.sh +++ b/pkgs/build-support/rust/hooks/maturin-build-hook.sh @@ -14,7 +14,7 @@ maturinBuildHook() { local flagsArray=( "--jobs=$NIX_BUILD_CORES" - "--interpreter=@pythonInterpreter@" + "--interpreter=@pythonExecutable@" "--offline" "--target" "@rustTargetPlatformSpec@" "--manylinux" "off"