2021-01-25 08:26:54 +00:00
|
|
|
{ lib, buildPythonPackage, fetchPypi, fetchpatch, substituteAll, python, nose, mercurial }:
|
2017-09-16 05:46:27 +01:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "python-hglib";
|
2018-06-12 17:47:01 +01:00
|
|
|
version = "2.6.1";
|
2017-09-16 05:46:27 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2018-06-12 17:47:01 +01:00
|
|
|
sha256 = "7c1fa0cb4d332dd6ec8409b04787ceba4623e97fb378656f7cab0b996c6ca3b2";
|
2017-09-16 05:46:27 +01:00
|
|
|
};
|
|
|
|
|
2019-03-21 08:49:52 +00:00
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./hgpath.patch;
|
|
|
|
hg = "${mercurial}/bin/hg";
|
|
|
|
})
|
2020-02-04 05:41:20 +00:00
|
|
|
|
|
|
|
# These two patches are needed to fix the tests.
|
|
|
|
# They will need to be removed on the next update.
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://www.mercurial-scm.org/repo/python-hglib/raw-rev/12e6aaef0f6e";
|
|
|
|
sha256 = "159pmhy23gqcc6rkh5jrni8fba4xbhxwcc0jf02wqr7f82kv8a7x";
|
|
|
|
})
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://www.mercurial-scm.org/repo/python-hglib/raw-rev/1a318162f06f";
|
|
|
|
sha256 = "04lxfc15m3yw5kvp133xg8zv09l8kndi146xk3lnbbm07fgcnn1z";
|
|
|
|
})
|
2019-03-21 08:49:52 +00:00
|
|
|
];
|
|
|
|
|
2017-09-16 05:46:27 +01:00
|
|
|
checkInputs = [ nose ];
|
|
|
|
|
2019-03-21 08:49:52 +00:00
|
|
|
checkPhase = ''
|
2020-07-05 06:35:44 +01:00
|
|
|
${python.interpreter} test.py --with-hg "${mercurial}/bin/hg" -v
|
2019-03-21 08:49:52 +00:00
|
|
|
'';
|
2017-09-16 05:46:27 +01:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2017-09-16 05:46:27 +01:00
|
|
|
description = "Mercurial Python library";
|
|
|
|
homepage = "http://selenic.com/repo/python-hglib";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ dfoxfranke ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|