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 { (buildEnv {
name = "python-${python.version}-wrapper"; 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; ignoreCollisions = false;
postBuild = '' postBuild = ''
. "${makeWrapper}/nix-support/setup-hook" . "${makeWrapper}/nix-support/setup-hook"
if [ -L "$out/bin" ]; then if [ -L "$out/bin" ]; then
unlink "$out/bin" unlink "$out/bin"
fi fi
mkdir -p "$out/bin" mkdir -p "$out/bin"
cd "${python}/bin" cd "${python}/bin"
for prg in *; do for prg in *; do
echo "$prg --> $out/bin/$prg" echo "$prg --> $out/bin/$prg"