python.pkgs.hglib: use patch to specify hg path (#57926)

This commit is contained in:
Robert Schütz
2019-03-21 09:49:52 +01:00
committed by GitHub
parent 9107b4af4f
commit 19aaebe419
2 changed files with 36 additions and 5 deletions
@@ -1,4 +1,4 @@
{ stdenv, buildPythonPackage, fetchPypi, nose, mercurial, isPy3k }:
{ stdenv, buildPythonPackage, fetchPypi, substituteAll, python, nose, mercurial }:
buildPythonPackage rec {
pname = "python-hglib";
@@ -9,11 +9,18 @@ buildPythonPackage rec {
sha256 = "7c1fa0cb4d332dd6ec8409b04787ceba4623e97fb378656f7cab0b996c6ca3b2";
};
checkInputs = [ nose ];
buildInputs = [ mercurial ];
patches = [
(substituteAll {
src = ./hgpath.patch;
hg = "${mercurial}/bin/hg";
})
];
checkPhase = ''python test.py'';
doCheck = if isPy3k then false else true;
checkInputs = [ nose ];
checkPhase = ''
${python.interpreter} test.py --with-hg "${mercurial}/bin/hg"
'';
meta = with stdenv.lib; {
description = "Mercurial Python library";