scons: use python2 and refactor expression
This commit is contained in:
parent
936bfd23e1
commit
f42a7068da
@ -1,29 +1,17 @@
|
|||||||
{stdenv, fetchurl, python, makeWrapper}:
|
{stdenv, fetchurl, python2Packages}:
|
||||||
|
|
||||||
let
|
let
|
||||||
name = "scons";
|
name = "scons";
|
||||||
version = "2.5.0";
|
version = "2.5.0";
|
||||||
in
|
in python2Packages.buildPythonApplication {
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
|
||||||
name = "${name}-${version}";
|
name = "${name}-${version}";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://sourceforge/scons/${name}-${version}.tar.gz";
|
url = "mirror://sourceforge/scons/${name}-${version}.tar.gz";
|
||||||
sha256 = "1sdcj8iapfzmlq7098yas40qwl6khsiwydbxv33sw81wy93nnagb";
|
sha256 = "1sdcj8iapfzmlq7098yas40qwl6khsiwydbxv33sw81wy93nnagb";
|
||||||
};
|
};
|
||||||
|
# No tests
|
||||||
buildInputs = [python makeWrapper];
|
doCheck = false;
|
||||||
|
|
||||||
preConfigure = ''
|
|
||||||
for i in "script/"*; do
|
|
||||||
substituteInPlace $i --replace "/usr/bin/env python" "${python}/bin/python"
|
|
||||||
done
|
|
||||||
'';
|
|
||||||
buildPhase = "python setup.py install --prefix=$out --install-data=$out/share --install-lib=$(toPythonPath $out) --symlink-scons -O1";
|
|
||||||
installPhase = "for n in $out/bin/*-${version}; do wrapProgram $n --suffix PYTHONPATH ':' \"$(toPythonPath $out)\"; done";
|
|
||||||
|
|
||||||
pythonPath = [];
|
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
homepage = "http://scons.org/";
|
homepage = "http://scons.org/";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user