From 46419ae45430992131c6b6c6189887eefa3bc77f Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Thu, 7 Nov 2013 13:59:44 +0100 Subject: [PATCH] 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. --- pkgs/development/interpreters/python/wrapper.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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"