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

Fix virtualenvwrapper shell scripts

This commit is contained in:
Jascha Geerds 2014-08-08 17:30:35 +02:00
parent c2760bbb03
commit 67820820a6

View file

@ -8168,6 +8168,15 @@ rec {
patchPhase = ''
substituteInPlace "virtualenvwrapper.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 = {