about summary refs log tree commit diff
path: root/pkgs/development/python-modules/anonip/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/anonip/default.nix')
-rw-r--r--pkgs/development/python-modules/anonip/default.nix35
1 files changed, 28 insertions, 7 deletions
diff --git a/pkgs/development/python-modules/anonip/default.nix b/pkgs/development/python-modules/anonip/default.nix
index 0663fddd6fb0f..96115aaee439c 100644
--- a/pkgs/development/python-modules/anonip/default.nix
+++ b/pkgs/development/python-modules/anonip/default.nix
@@ -1,24 +1,45 @@
-{ lib, buildPythonPackage, fetchFromGitHub, ipaddress, isPy27 }:
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, pytestCheckHook
+, pythonOlder
+}:
 
 buildPythonPackage rec {
   pname = "anonip";
-  version = "1.0.0";
+  version = "1.1.0";
+  format = "setuptools";
+
+  disabled = pythonOlder "3.7";
 
   src = fetchFromGitHub {
     owner = "DigitaleGesellschaft";
     repo = "Anonip";
     rev = "v${version}";
-    sha256 = "0y5xqivcinp6pwx4whc8ca1n2wxrvff7a2lpbz2dhivilfanmljs";
+    sha256 = "0cssdcridadjzichz1vv1ng7jwphqkn8ihh83hpz9mcjmxyb94qc";
   };
 
-  propagatedBuildInputs = lib.optionals isPy27 [ ipaddress ];
+  checkInputs = [
+    pytestCheckHook
+  ];
+
+  postPatch = ''
+    substituteInPlace setup.cfg \
+      --replace " --cov=anonip --cov-report=term-missing --no-cov-on-fail" ""
+  '';
+
+  pytestFlagsArray = [
+    "tests.py"
+  ];
 
-  checkPhase = "python tests.py";
+  pythonImportsCheck = [
+    "anonip"
+  ];
 
   meta = with lib; {
+    description = "Tool to anonymize IP addresses in log files";
     homepage = "https://github.com/DigitaleGesellschaft/Anonip";
-    description = "A tool to anonymize IP-addresses in log-files";
     license = licenses.bsd3;
-    maintainers = [ maintainers.mmahut ];
+    maintainers = with maintainers; [ mmahut ];
   };
 }