From 1939a97811b15ace55a172d1f5e32dcb8f562cb0 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 21 Nov 2019 22:00:14 +0100 Subject: [PATCH] python3: add pythonForBuild as parameter, fixes python3Minimal `pythonForBuild` exists for cross-compilation. When one overrides python, one needs to ensure pythonForBuild matches. --- pkgs/development/interpreters/python/cpython/default.nix | 3 ++- pkgs/development/interpreters/python/default.nix | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/development/interpreters/python/cpython/default.nix b/pkgs/development/interpreters/python/cpython/default.nix index 09c324716bda..43d2d159e36a 100644 --- a/pkgs/development/interpreters/python/cpython/default.nix +++ b/pkgs/development/interpreters/python/cpython/default.nix @@ -17,6 +17,7 @@ # For the Python package set , packageOverrides ? (self: super: {}) , buildPackages +, pythonForBuild ? buildPackages.${"python${sourceVersion.major}${sourceVersion.minor}"} , sourceVersion , sha256 , passthruFun @@ -63,7 +64,7 @@ let hasDistutilsCxxPatch = !(stdenv.cc.isGNU or false); - pythonForBuild = buildPackages.${"python${sourceVersion.major}${sourceVersion.minor}"}; + inherit pythonForBuild; pythonForBuildInterpreter = if stdenv.hostPlatform == stdenv.buildPlatform then "$out/bin/python" diff --git a/pkgs/development/interpreters/python/default.nix b/pkgs/development/interpreters/python/default.nix index 7fa276dd0708..3be722cd1561 100644 --- a/pkgs/development/interpreters/python/default.nix +++ b/pkgs/development/interpreters/python/default.nix @@ -129,6 +129,7 @@ in rec { # Minimal versions of Python (built without optional dependencies) python3Minimal = (python37.override { self = python3Minimal; + pythonForBuild = pkgs.buildPackages.python3Minimal; # strip down that python version as much as possible openssl = null; readline = null;