diff --git a/pkgs/development/python-modules/python-hglib/default.nix b/pkgs/development/python-modules/python-hglib/default.nix index 528316240c0a..8477de756358 100644 --- a/pkgs/development/python-modules/python-hglib/default.nix +++ b/pkgs/development/python-modules/python-hglib/default.nix @@ -1,9 +1,10 @@ { lib, buildPythonPackage, - fetchPypi, + fetchzip, mercurial, - nose, + pytestCheckHook, + fetchpatch2, }: buildPythonPackage rec { @@ -11,14 +12,28 @@ buildPythonPackage rec { version = "2.6.2"; format = "setuptools"; - src = fetchPypi { - inherit pname version; - hash = "sha256-sYvR7VPJDuV9VxTWata7crZOkw1K7KmDCJLAi7KNpgg="; + src = fetchzip { + url = "https://repo.mercurial-scm.org/python-hglib/archive/${version}.tar.gz"; + hash = "sha256-UXersegqJ9VAxy4Kvpb2IiOJfQbWryeeaGvwiR4ncW8="; }; + patches = [ + (fetchpatch2 { + name = "remove-nose.patch"; + excludes = [ "heptapod-ci.yml" ]; + url = "https://repo.mercurial-scm.org/python-hglib/raw-rev/8341f2494b3f"; + hash = "sha256-4gicVCAH94itxHY0l8ek0L/RVhUrw2lMbbnENbWrV6U="; + }) + (fetchpatch2 { + name = "fix-tests.patch"; + url = "https://repo.mercurial-scm.org/python-hglib/raw-rev/a2afbf236ca8"; + hash = "sha256-T/yKJ8cMMOBVk24SXwyPOoD321S1fZEIunaPJAxI0KI="; + }) + ]; + nativeCheckInputs = [ mercurial - nose + pytestCheckHook ]; preCheck = ''