diff options
Diffstat (limited to 'pkgs/development/python-modules/mohawk/default.nix')
-rw-r--r-- | pkgs/development/python-modules/mohawk/default.nix | 35 |
1 files changed, 26 insertions, 9 deletions
diff --git a/pkgs/development/python-modules/mohawk/default.nix b/pkgs/development/python-modules/mohawk/default.nix index 99caae9ec3f6..5054fcae7b79 100644 --- a/pkgs/development/python-modules/mohawk/default.nix +++ b/pkgs/development/python-modules/mohawk/default.nix @@ -1,25 +1,42 @@ -{ lib, buildPythonPackage, fetchPypi, mock, nose, pytest, six }: +{ + lib, + buildPythonPackage, + fetchPypi, + fetchpatch2, + pytestCheckHook, + six, + setuptools, +}: buildPythonPackage rec { pname = "mohawk"; version = "1.1.0"; - format = "setuptools"; + pyproject = true; src = fetchPypi { inherit pname version; - sha256 = "08wppsv65yd0gdxy5zwq37yp6jmxakfz4a2yx5wwq2d222my786j"; + hash = "sha256-0qDjqxCiCcx56V4o8t1UvUpz/RmY/+J7e6D5Yra+lyM="; }; - propagatedBuildInputs = [ six ]; + patches = [ + (fetchpatch2 { + # https://github.com/kumar303/mohawk/pull/59 + name = "nose-to-pytest.patch"; + url = "https://github.com/kumar303/mohawk/compare/b7899166880e890f01cf2531b5686094ba08df8f...66157c7efbf6b0d18c30a9ffe5dfd84bef27bd3a.patch"; + hash = "sha256-w3sP5XeBqOwoPGsWzYET4djYwuKPaS4OOlC3HBPD0NI="; + }) + ]; - nativeCheckInputs = [ mock nose pytest ]; + build-system = [ setuptools ]; - checkPhase = '' - pytest mohawk/tests.py - ''; + dependencies = [ six ]; + + nativeCheckInputs = [ pytestCheckHook ]; + + pytestFlagsArray = [ "mohawk/tests.py" ]; meta = { - description = "Python library for Hawk HTTP authorization."; + description = "Python library for Hawk HTTP authorization"; homepage = "https://github.com/kumar303/mohawk"; license = lib.licenses.mpl20; maintainers = [ ]; |