about summary refs log tree commit diff
path: root/pkgs/development/python-modules/ripe-atlas-sagan/default.nix
blob: a9ed4bd3f52cc920f4ae18d7cf912cd7ee76a66f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
{ lib
, buildPythonPackage
, cryptography
, fetchFromGitHub
, pytestCheckHook
, python-dateutil
, pythonOlder
, pytz
, ujson
}:

buildPythonPackage rec {
  pname = "ripe-atlas-sagan";
  version = "1.3.1";
  format = "setuptools";

  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "RIPE-NCC";
    repo = pname;
    rev = "v${version}";
    hash = "sha256-xIBIKsQvDmVBa/C8/7Wr3WKeepHaGhoXlgatXSUtWLA=";
  };

  propagatedBuildInputs = [
    cryptography
    python-dateutil
    pytz
  ];

  passthru.optional-dependencies = {
    fast = [
      ujson
    ];
  };

  nativeCheckInputs = [
    pytestCheckHook
  ];

  pytestFlagsArray = [
    "tests/*.py"
  ];

  disabledTests = [
    # This test fail for unknown reason, I suspect it to be flaky.
    "test_invalid_country_code"
  ];

  pythonImportsCheck = [
    "ripe.atlas.sagan"
  ];

  meta = with lib; {
    description = "A parsing library for RIPE Atlas measurements results";
    homepage = "https://github.com/RIPE-NCC/ripe-atlas-sagan";
    license = licenses.gpl3Only;
    maintainers = with maintainers; [ raitobezarius ];
  };
}