1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-25 15:11:35 +00:00

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"