diff options
Diffstat (limited to 'pkgs/development/python-modules/iptools/default.nix')
-rw-r--r-- | pkgs/development/python-modules/iptools/default.nix | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/pkgs/development/python-modules/iptools/default.nix b/pkgs/development/python-modules/iptools/default.nix index 42e296afcc86a..c3d14b161c02d 100644 --- a/pkgs/development/python-modules/iptools/default.nix +++ b/pkgs/development/python-modules/iptools/default.nix @@ -1,25 +1,34 @@ { lib, buildPythonPackage, - fetchPypi, - nose, + fetchFromGitHub, + pytestCheckHook, + setuptools, }: buildPythonPackage rec { version = "0.7.0"; - format = "setuptools"; pname = "iptools"; + pyproject = true; - src = fetchPypi { - inherit pname version; - sha256 = "1sp2v76qqsgqjk0vqfbm2s4sc4mi0gkkpzjnvwih3ymmidilz2hi"; + src = fetchFromGitHub { + owner = "bd808"; + repo = "python-iptools"; + rev = "refs/tags/v${version}"; + hash = "sha256-340Wc4QGwUqEEANM5EQzFaXxIWVf2fDr4qfCuxNEVBQ="; }; - buildInputs = [ nose ]; + build-system = [ setuptools ]; + + pythonImportsCheck = [ "iptools" ]; + + nativeCheckInputs = [ pytestCheckHook ]; + + pytestFlagsArray = [ "tests/iptools/iptools_test.py" ]; meta = with lib; { description = "Utilities for manipulating IP addresses including a class that can be used to include CIDR network blocks in Django's INTERNAL_IPS setting"; - homepage = "https://pypi.python.org/pypi/iptools"; + homepage = "https://github.com/bd808/python-iptools"; license = licenses.bsd0; }; } |