1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pytestCheckHook
5, pythonOlder
6}:
7
8buildPythonPackage rec {
9 pname = "anonip";
10 version = "1.1.0";
11 format = "setuptools";
12
13 disabled = pythonOlder "3.7";
14
15 src = fetchFromGitHub {
16 owner = "DigitaleGesellschaft";
17 repo = "Anonip";
18 rev = "v${version}";
19 sha256 = "0cssdcridadjzichz1vv1ng7jwphqkn8ihh83hpz9mcjmxyb94qc";
20 };
21
22 checkInputs = [
23 pytestCheckHook
24 ];
25
26 postPatch = ''
27 substituteInPlace setup.cfg \
28 --replace " --cov=anonip --cov-report=term-missing --no-cov-on-fail" ""
29 '';
30
31 pytestFlagsArray = [
32 "tests.py"
33 ];
34
35 pythonImportsCheck = [
36 "anonip"
37 ];
38
39 meta = with lib; {
40 description = "Tool to anonymize IP addresses in log files";
41 homepage = "https://github.com/DigitaleGesellschaft/Anonip";
42 license = licenses.bsd3;
43 maintainers = with maintainers; [ mmahut ];
44 };
45}