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:
Peter Simons 2013-11-07 13:59:44 +01:00
parent b66a59bf41
commit 46419ae454

View File

@ -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"