From 0fd3db4ba1d1d6d3a6108970ef96b24853593414 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Domen=20Ko=C5=BEar?= Date: Sat, 7 Mar 2015 22:31:40 +0100 Subject: [PATCH] fix #6548 --- pkgs/development/python-modules/generic/wrap.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/generic/wrap.sh b/pkgs/development/python-modules/generic/wrap.sh index 857f002cace9..e343536b8fa8 100644 --- a/pkgs/development/python-modules/generic/wrap.sh +++ b/pkgs/development/python-modules/generic/wrap.sh @@ -16,13 +16,13 @@ wrapPythonProgramsIn() { done for i in $(find "$dir" -type f -perm +0100); do - # Rewrite "#! .../env python" to "#! /nix/store/.../python". if head -n1 "$i" | grep -q '#!.*/env.*\(python\|pypy\)'; then sed -i "$i" -e "1 s^.*/env[ ]*\(python\|pypy\)^#! $python^" fi - if head -n1 "$i" | grep -q '/python\|/pypy'; then + # catch /python and /.python-wrapped + if head -n1 "$i" | grep -q '/\.\?\(python\|pypy\)'; then # dont wrap EGG-INFO scripts since they are called from python if echo "$i" | grep -v EGG-INFO/scripts; then echo "wrapping \`$i'..."