summary refs log tree commit diff
path: root/pkgs/development/interpreters
diff options
context:
space:
mode:
authorFrederik Rietdijk <freddyrietdijk@fridh.nl>2017-12-11 09:46:15 +0100
committerGitHub <noreply@github.com>2017-12-11 09:46:15 +0100
commit35ccdb86323c6a43ed3281e43cb32a723700eab9 (patch)
tree5c59b904ad28c2e9a0624197585febbbfbd6d03d /pkgs/development/interpreters
parent44f46a32930b08fcdf42e3670d5c476e191be1a5 (diff)
parentc86b19cb20f68e6b65af6ac884940ea125e4a8f8 (diff)
downloadnixlib-35ccdb86323c6a43ed3281e43cb32a723700eab9.tar
nixlib-35ccdb86323c6a43ed3281e43cb32a723700eab9.tar.gz
nixlib-35ccdb86323c6a43ed3281e43cb32a723700eab9.tar.bz2
nixlib-35ccdb86323c6a43ed3281e43cb32a723700eab9.tar.lz
nixlib-35ccdb86323c6a43ed3281e43cb32a723700eab9.tar.xz
nixlib-35ccdb86323c6a43ed3281e43cb32a723700eab9.tar.zst
nixlib-35ccdb86323c6a43ed3281e43cb32a723700eab9.zip
Merge pull request #32544 from FRidh/pythonmodule
Python: rewrite requiredPythonModules to prevent stack overflows
Diffstat (limited to 'pkgs/development/interpreters')
-rw-r--r--pkgs/development/interpreters/python/build-python-package.nix4
-rw-r--r--pkgs/development/interpreters/python/mk-python-derivation.nix11
2 files changed, 5 insertions, 10 deletions
diff --git a/pkgs/development/interpreters/python/build-python-package.nix b/pkgs/development/interpreters/python/build-python-package.nix
index 982542c1fc3e..12d17b2e8322 100644
--- a/pkgs/development/interpreters/python/build-python-package.nix
+++ b/pkgs/development/interpreters/python/build-python-package.nix
@@ -7,7 +7,7 @@
 , setuptools
 , unzip
 , ensureNewerSourcesHook
-, pythonModule
+, toPythonModule
 , namePrefix
 , bootstrapped-pip
 , flit
@@ -19,7 +19,7 @@ let
   wheel-specific = import ./build-python-package-wheel.nix { };
   common = import ./build-python-package-common.nix { inherit python bootstrapped-pip; };
   mkPythonDerivation = import ./mk-python-derivation.nix {
-    inherit lib python wrapPython setuptools unzip ensureNewerSourcesHook pythonModule namePrefix;
+    inherit lib python wrapPython setuptools unzip ensureNewerSourcesHook toPythonModule namePrefix;
   };
 in
 
diff --git a/pkgs/development/interpreters/python/mk-python-derivation.nix b/pkgs/development/interpreters/python/mk-python-derivation.nix
index 1fd6745093bb..5f7348ac825f 100644
--- a/pkgs/development/interpreters/python/mk-python-derivation.nix
+++ b/pkgs/development/interpreters/python/mk-python-derivation.nix
@@ -7,7 +7,7 @@
 , unzip
 , ensureNewerSourcesHook
 # Whether the derivation provides a Python module or not.
-, pythonModule
+, toPythonModule
 , namePrefix
 }:
 
@@ -60,7 +60,7 @@ if disabled
 then throw "${name} not supported for interpreter ${python.executable}"
 else
 
-python.stdenv.mkDerivation (builtins.removeAttrs attrs [
+toPythonModule (python.stdenv.mkDerivation (builtins.removeAttrs attrs [
     "disabled" "checkInputs" "doCheck" "doInstallCheck" "dontWrapPythonPrograms" "catchConflicts"
   ] // {
 
@@ -95,14 +95,9 @@ python.stdenv.mkDerivation (builtins.removeAttrs attrs [
     ${python.interpreter} ${./catch_conflicts}/catch_conflicts.py
   '' + attrs.postFixup or '''';
 
-  passthru = {
-    inherit python; # The python interpreter
-    inherit pythonModule;
-  } // passthru;
-
   meta = {
     # default to python's platforms
     platforms = python.meta.platforms;
     isBuildPythonPackage = python.meta.platforms;
   } // meta;
-})
+}))