2024-06-05 15:53:02 +00:00
|
|
|
|
{
|
|
|
|
|
lib,
|
|
|
|
|
buildPythonPackage,
|
2024-09-19 14:19:46 +00:00
|
|
|
|
fetchzip,
|
2024-06-05 15:53:02 +00:00
|
|
|
|
mercurial,
|
2024-09-19 14:19:46 +00:00
|
|
|
|
pytestCheckHook,
|
|
|
|
|
fetchpatch2,
|
|
|
|
|
setuptools,
|
2021-12-06 16:07:01 +00:00
|
|
|
|
}:
|
|
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
|
pname = "python-hglib";
|
|
|
|
|
version = "2.6.2";
|
2024-09-19 14:19:46 +00:00
|
|
|
|
pyproject = true;
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
|
src = fetchzip {
|
|
|
|
|
url = "https://repo.mercurial-scm.org/python-hglib/archive/${version}.tar.gz";
|
|
|
|
|
hash = "sha256-UXersegqJ9VAxy4Kvpb2IiOJfQbWryeeaGvwiR4ncW8=";
|
2021-12-06 16:07:01 +00:00
|
|
|
|
};
|
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
|
patches = [
|
|
|
|
|
(fetchpatch2 {
|
|
|
|
|
name = "remove-nose.patch";
|
|
|
|
|
excludes = [ "heptapod-ci.yml" ];
|
|
|
|
|
url = "https://repo.mercurial-scm.org/python-hglib/raw-rev/8341f2494b3fc1c0d9ee55fa4487c0ac82f64d2a";
|
|
|
|
|
hash = "sha256-4gicVCAH94itxHY0l8ek0L/RVhUrw2lMbbnENbWrV6U=";
|
|
|
|
|
})
|
|
|
|
|
(fetchpatch2 {
|
|
|
|
|
name = "fix-tests.patch";
|
|
|
|
|
url = "https://repo.mercurial-scm.org/python-hglib/raw-rev/a2afbf236ca86287e72f54e1248413625d1bc405";
|
|
|
|
|
hash = "sha256-T/yKJ8cMMOBVk24SXwyPOoD321S1fZEIunaPJAxI0KI=";
|
|
|
|
|
})
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
|
nativeCheckInputs = [
|
|
|
|
|
mercurial
|
2024-09-19 14:19:46 +00:00
|
|
|
|
pytestCheckHook
|
2024-06-05 15:53:02 +00:00
|
|
|
|
];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
|
export HGTMP=$(mktemp -d)
|
|
|
|
|
export HGUSER=test
|
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "hglib" ];
|
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
|
meta = {
|
2024-06-20 14:57:18 +00:00
|
|
|
|
description = "Library with a fast, convenient interface to Mercurial. It uses Mercurial’s command server for communication with hg";
|
2021-12-06 16:07:01 +00:00
|
|
|
|
homepage = "https://www.mercurial-scm.org/wiki/PythonHglibs";
|
2024-09-19 14:19:46 +00:00
|
|
|
|
license = lib.licenses.mit;
|
2024-06-05 15:53:02 +00:00
|
|
|
|
maintainers = [ ];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
};
|
|
|
|
|
}
|