Python: wrapPythonPrograms: only wrap in $out/bin

Thus far all executables in a derivation were wrapped. This commit
only wraps executables in $out/bin. If other scripts need to be wrapped
as well, then one can use wrapPythonProgramsIn.
This commit is contained in:
Frederik Rietdijk 2017-05-24 08:43:07 +02:00
parent dc2250eb5e
commit c10af9e744

View File

@ -1,7 +1,7 @@
# Wrapper around wrapPythonProgramsIn, below. The $pythonPath
# variable is passed in from the buildPythonPackage function.
wrapPythonPrograms() {
wrapPythonProgramsIn $out "$out $pythonPath"
wrapPythonProgramsIn "$out/bin" "$out $pythonPath"
}
# Builds environment variables like PYTHONPATH and PATH walking through closure
@ -47,6 +47,7 @@ wrapPythonProgramsIn() {
buildPythonPath "$pythonPath"
# Find all regular files in the output directory that are executable.
if [ -d "$dir" ]; then
find "$dir" -type f -perm -0100 -print0 | while read -d "" f; do
# Rewrite "#! .../env python" to "#! /nix/store/.../python".
# Strip suffix, like "3" or "2.7m" -- we don't have any choice on which
@ -75,6 +76,7 @@ wrapPythonProgramsIn() {
fi
fi
done
fi
}
# Adds the lib and bin directories to the PYTHONPATH and PATH variables,