Fix virtualenvwrapper shell scripts

This commit is contained in:
Jascha Geerds 2014-08-08 17:30:35 +02:00
parent c2760bbb03
commit 67820820a6
1 changed files with 9 additions and 0 deletions

View File

@ -8168,6 +8168,15 @@ rec {
patchPhase = '' patchPhase = ''
substituteInPlace "virtualenvwrapper.sh" --replace "which" "${pkgs.which}/bin/which" substituteInPlace "virtualenvwrapper.sh" --replace "which" "${pkgs.which}/bin/which"
substituteInPlace "virtualenvwrapper_lazy.sh" --replace "which" "${pkgs.which}/bin/which" substituteInPlace "virtualenvwrapper_lazy.sh" --replace "which" "${pkgs.which}/bin/which"
# This might look like a dirty hack but we can't use the makeWrapper function because
# the wrapped file were then called via "exec". The virtualenvwrapper shell scripts
# aren't normal executables. Instead, the user has to evaluate them.
for file in "virtualenvwrapper.sh" "virtualenvwrapper_lazy.sh"; do
# Insert the required PATH & PYTHONPATH variables right on the top
sed -i "2iexport PATH=$PATH:\$PATH" "$file"
sed -i "3iexport PYTHONPATH=$PYTHONPATH:$(toPythonPath $out):\$PYTHONPATH" "$file"
done
''; '';
meta = { meta = {