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.
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user