diff options
Diffstat (limited to 'pkgs/development/interpreters/python/mk-python-derivation.nix')
-rw-r--r-- | pkgs/development/interpreters/python/mk-python-derivation.nix | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/pkgs/development/interpreters/python/mk-python-derivation.nix b/pkgs/development/interpreters/python/mk-python-derivation.nix index b9a6835908f..7718bdfde5d 100644 --- a/pkgs/development/interpreters/python/mk-python-derivation.nix +++ b/pkgs/development/interpreters/python/mk-python-derivation.nix @@ -77,7 +77,7 @@ let self = toPythonModule (python.stdenv.mkDerivation (builtins.removeAttrs attr buildInputs = [ wrapPython ] ++ lib.optional (lib.hasSuffix "zip" (attrs.src.name or "")) unzip - ++ lib.optional catchConflicts setuptools # If we no longer propagate setuptools +# ++ lib.optional catchConflicts setuptools # If we no longer propagate setuptools ++ buildInputs ++ pythonPath; @@ -100,9 +100,12 @@ let self = toPythonModule (python.stdenv.mkDerivation (builtins.removeAttrs attr # Check if we have two packages with the same name in the closure and fail. # If this happens, something went wrong with the dependencies specs. # Intentionally kept in a subdirectory, see catch_conflicts/README.md. - ${python.interpreter} ${./catch_conflicts}/catch_conflicts.py + ${python.pythonForBuild.interpreter} ${./catch_conflicts}/catch_conflicts.py '' + attrs.postFixup or ''''; + # Python packages built through cross-compilation are always for the host platform. + disallowedReferences = lib.optionals (python.stdenv.hostPlatform != python.stdenv.buildPlatform) [ python.pythonForBuild ]; + meta = { # default to python's platforms platforms = python.meta.platforms; |