diff --git a/pkgs/development/python-modules/pyhamcrest/default.nix b/pkgs/development/python-modules/pyhamcrest/default.nix index a4c04ce79ee6..ffe11cc140b3 100644 --- a/pkgs/development/python-modules/pyhamcrest/default.nix +++ b/pkgs/development/python-modules/pyhamcrest/default.nix @@ -1,20 +1,39 @@ -{ lib, buildPythonPackage, fetchPypi -, mock, pytest -, six +{ lib +, buildPythonPackage +, fetchFromGitHub +, hatchling +, hatch-vcs +, numpy +, pythonOlder +, pytest-xdist +, pytestCheckHook }: -buildPythonPackage rec { - pname = "PyHamcrest"; - version = "2.0.3"; - src = fetchPypi { - inherit pname version; - sha256 = "dfb19cf6d71743e086fbb761ed7faea5aacbc8ec10c17a08b93ecde39192a3db"; +buildPythonPackage rec { + pname = "pyhamcrest"; + version = "2.0.4"; + format = "pyproject"; + disabled = pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = "hamcrest"; + repo = "PyHamcrest"; + rev = "refs/tags/V${version}"; + hash = "sha256-CIkttiijbJCR0zdmwM5JvFogQKYuHUXHJhdyWonHcGk="; }; - checkInputs = [ mock pytest ]; - propagatedBuildInputs = [ six ]; + SETUPTOOLS_SCM_PRETEND_VERSION = version; - doCheck = false; # pypi tarball does not include tests + nativeBuildInputs = [ + hatchling + hatch-vcs + ]; + + checkInputs = [ + numpy + pytest-xdist + pytestCheckHook + ]; meta = with lib; { homepage = "https://github.com/hamcrest/PyHamcrest";