about summary refs log tree commit diff
path: root/pkgs/development/python-modules/pykeyatome/default.nix
blob: 18f6fb7a9ee8696e1f022228001c876c4d26647d (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
, fake-useragent
, fetchFromGitHub
, pytest-aiohttp
, pytestCheckHook
, pythonOlder
, requests
, requests-mock
, responses
, simplejson
}:

buildPythonPackage rec {
  pname = "pykeyatome";
  version = "2.1.2";
  format = "setuptools";

  disabled = pythonOlder "3.8";

  src = fetchFromGitHub {
    owner = "jugla";
    repo = "pyKeyAtome";
    rev = "refs/tags/V${version}";
    hash = "sha256-zRXUjekawf2/zTSlXqHVB02dDkb6HbU4NN6UBgl2rtg=";
  };

  propagatedBuildInputs = [
    fake-useragent
    requests
    simplejson
  ];

  nativeCheckInputs = [
    pytest-aiohttp
    pytestCheckHook
    requests-mock
    responses
  ];

  disabledTests = [
    # Tests require network access
    "test_consumption"
    "test_get_live"
    "test_login"
    "test_relog_after_session_down"
  ];

  pythonImportsCheck = [
    "pykeyatome"
  ];

  meta = with lib; {
    description = "Python module to get data from Atome Key";
    mainProgram = "pykeyatome";
    homepage = "https://github.com/jugla/pyKeyAtome";
    changelog = "https://github.com/jugla/pyKeyAtome/releases/tag/V${version}";
    license = licenses.mit;
    maintainers = with maintainers; [ fab ];
  };
}