mercurial: use mkPythonDerivation

since we don't want to use `--prefix PYTHONPATH` since it leaks
PYTHONPATH.
This commit is contained in:
Frederik Rietdijk 2016-10-31 16:54:00 +01:00
parent aa2b8d25d6
commit a01d7d131e

View File

@ -7,9 +7,7 @@ let
version = "3.9.2"; version = "3.9.2";
name = "mercurial-${version}"; name = "mercurial-${version}";
inherit (python2Packages) docutils hg-git dulwich python; inherit (python2Packages) docutils hg-git dulwich python;
in in python2Packages.mkPythonDerivation {
stdenv.mkDerivation {
inherit name; inherit name;
src = fetchurl { src = fetchurl {
@ -19,10 +17,10 @@ stdenv.mkDerivation {
inherit python; # pass it so that the same version can be used in hg2git inherit python; # pass it so that the same version can be used in hg2git
buildInputs = [ python makeWrapper docutils unzip ]; buildInputs = [ makeWrapper docutils unzip ];
propagatedBuildInputs = stdenv.lib.optionals stdenv.isDarwin propagatedBuildInputs = [ hg-git dulwich ]
[ ApplicationServices cf-private ]; ++ stdenv.lib.optionals stdenv.isDarwin [ ApplicationServices cf-private ];
makeFlags = "PREFIX=$(out)"; makeFlags = "PREFIX=$(out)";
@ -42,7 +40,6 @@ stdenv.mkDerivation {
'' ''
for i in $(cd $out/bin && ls); do for i in $(cd $out/bin && ls); do
wrapProgram $out/bin/$i \ wrapProgram $out/bin/$i \
--prefix PYTHONPATH : "$(toPythonPath "$out ${hg-git}"):$(toPythonPath "$out ${dulwich}")" \
$WRAP_TK $WRAP_TK
done done