diff options
author | Nikolay Amiantov <ab@fmap.me> | 2016-08-23 17:54:11 +0300 |
---|---|---|
committer | Nikolay Amiantov <ab@fmap.me> | 2016-08-23 17:55:12 +0300 |
commit | 13c04c837db0f69705cfa4478c513b2230243ca2 (patch) | |
tree | cd566b591c637eb69c29d4ad61551a759fbcb3e6 /pkgs/development/python-modules | |
parent | ed20bbc8fb8048d35ad676c37f50628c9076ac93 (diff) | |
download | nixlib-13c04c837db0f69705cfa4478c513b2230243ca2.tar nixlib-13c04c837db0f69705cfa4478c513b2230243ca2.tar.gz nixlib-13c04c837db0f69705cfa4478c513b2230243ca2.tar.bz2 nixlib-13c04c837db0f69705cfa4478c513b2230243ca2.tar.lz nixlib-13c04c837db0f69705cfa4478c513b2230243ca2.tar.xz nixlib-13c04c837db0f69705cfa4478c513b2230243ca2.tar.zst nixlib-13c04c837db0f69705cfa4478c513b2230243ca2.zip |
wrapPython: fix replace of env invokations
Diffstat (limited to 'pkgs/development/python-modules')
-rw-r--r-- | pkgs/development/python-modules/generic/wrap.sh | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/pkgs/development/python-modules/generic/wrap.sh b/pkgs/development/python-modules/generic/wrap.sh index ca73a473ed56..f4b63b826403 100644 --- a/pkgs/development/python-modules/generic/wrap.sh +++ b/pkgs/development/python-modules/generic/wrap.sh @@ -8,7 +8,6 @@ wrapPythonPrograms() { # of dependencies. buildPythonPath() { local pythonPath="$1" - local python="@executable@" local path # Create an empty table of python paths (see doc on _addToPythonPath @@ -51,9 +50,9 @@ wrapPythonProgramsIn() { for f in $(find "$dir" -type f -perm -0100); do # Rewrite "#! .../env python" to "#! /nix/store/.../python". # Strip suffix, like "3" or "2.7m" -- we don't have any choice on which - # Python to use besides one in $python anyway. + # Python to use besides one with this hook anyway. if head -n1 "$f" | grep -q '#!.*/env.*\(python\|pypy\)'; then - sed -i "$f" -e "1 s^.*/env[ ]*\(python\|pypy\)[^ ]*^#! $python^" + sed -i "$f" -e "1 s^.*/env[ ]*\(python\|pypy\)[^ ]*^#! @executable@^" fi # catch /python and /.python-wrapped |