about summary refs log tree commit diff
path: root/pkgs/development/interpreters
diff options
context:
space:
mode:
authorPeter Simons <simons@cryp.to>2013-11-07 13:59:44 +0100
committerPeter Simons <simons@cryp.to>2013-11-07 14:00:08 +0100
commit46419ae45430992131c6b6c6189887eefa3bc77f (patch)
tree0d16c1d62c0e3814b2cbdcc4735c5269516ddec1 /pkgs/development/interpreters
parentb66a59bf41b97d0f5982e8cace60fda18c536563 (diff)
downloadnixlib-46419ae45430992131c6b6c6189887eefa3bc77f.tar
nixlib-46419ae45430992131c6b6c6189887eefa3bc77f.tar.gz
nixlib-46419ae45430992131c6b6c6189887eefa3bc77f.tar.bz2
nixlib-46419ae45430992131c6b6c6189887eefa3bc77f.tar.lz
nixlib-46419ae45430992131c6b6c6189887eefa3bc77f.tar.xz
nixlib-46419ae45430992131c6b6c6189887eefa3bc77f.tar.zst
nixlib-46419ae45430992131c6b6c6189887eefa3bc77f.zip
python-wrapper: recursively include all dependencies of the specified 'extraLibs' in the generated environment
This patch means that adding 'matplotlib' to extraLibs will automatically
include 'numpy', too, because matplotlib depends on it.
Diffstat (limited to 'pkgs/development/interpreters')
-rw-r--r--pkgs/development/interpreters/python/wrapper.nix4
1 files changed, 3 insertions, 1 deletions
diff --git a/pkgs/development/interpreters/python/wrapper.nix b/pkgs/development/interpreters/python/wrapper.nix
index 1699690749f1..a749a82fc8ae 100644
--- a/pkgs/development/interpreters/python/wrapper.nix
+++ b/pkgs/development/interpreters/python/wrapper.nix
@@ -4,15 +4,17 @@
 
 (buildEnv {
   name = "python-${python.version}-wrapper";
-  paths = extraLibs ++ [ python makeWrapper recursivePthLoader ];
+  paths = stdenv.lib.filter (x : x ? pythonPath) (stdenv.lib.closePropagation extraLibs) ++ [ python recursivePthLoader ];
   ignoreCollisions = false;
 
   postBuild = ''
     . "${makeWrapper}/nix-support/setup-hook"
+
     if [ -L "$out/bin" ]; then
         unlink "$out/bin"
     fi
     mkdir -p "$out/bin"
+
     cd "${python}/bin"
     for prg in *; do
       echo "$prg --> $out/bin/$prg"