summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/ismartgate/default.nix
blob: a04dbab45403971b8b64934adb8fd77744b3a6b9 (plain)
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
{
  lib,
  buildPythonPackage,
  click,
  defusedxml,
  dicttoxml,
  fetchFromGitHub,
  httpx,
  pycryptodome,
  pytest-asyncio,
  pytest-raises,
  pytestCheckHook,
  respx,
  typing-extensions,
}:

buildPythonPackage rec {
  pname = "ismartgate";
  version = "5.0.2";
  format = "setuptools";

  src = fetchFromGitHub {
    owner = "bdraco";
    repo = "ismartgate";
    tag = "v${version}";
    hash = "sha256-8c05zzDav87gTL2CI7Aoi6ALwLw76H9xj+90xH31hdE=";
  };

  postPatch = ''
    substituteInPlace setup.py \
      --replace '"pytest-runner>=5.2",' ""
  '';

  propagatedBuildInputs = [
    click
    defusedxml
    dicttoxml
    httpx
    pycryptodome
    typing-extensions
  ];

  nativeCheckInputs = [
    pytest-asyncio
    pytest-raises
    pytestCheckHook
    respx
  ];

  pythonImportsCheck = [ "ismartgate" ];

  meta = {
    description = "Python module to work with the ismartgate and gogogate2 API";
    homepage = "https://github.com/bdraco/ismartgate";
    changelog = "https://github.com/bdraco/ismartgate/releases/tag/v${version}";
    license = with lib.licenses; [ mit ];
    maintainers = with lib.maintainers; [ fab ];
  };
}