Patching scons to give an absolute path to python rather than using ".../bin/env python"

When users install scons, users no longer need to also install python in their environment.


svn path=/nixpkgs/trunk/; revision=24425
This commit is contained in:
Russell O'Connor 2010-10-22 19:10:02 +00:00
parent 9992ba5e3f
commit 9bcb9bcea1

View file

@ -13,6 +13,13 @@ stdenv.mkDerivation {
sha256 = "0qk74nrnm9qlijrq6gmy8cyhjgp0gis4zx44divnr8n487d5308a";
};
preConfigure = ''
for i in script/*
do
substituteInPlace $i --replace "/usr/bin/env python" "${python}/bin/python"
done
'';
propagatedBuildInputs = [python makeWrapper];
buildPhase = "python setup.py install --prefix=$out --install-lib=$(toPythonPath $out) --hardlink-scons -O1";
installPhase = "for n in $out/bin/*; do wrapProgram $n --suffix PYTHONPATH ':' \"$(toPythonPath $out)\"; done";