summary refs log tree commit diff
path: root/pkgs/development/python-modules/pythonegardia/default.nix
blob: 7ce66f221fb2771b2295b8485eb233ab8e22fd25 (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
{ lib
, buildPythonPackage
, fetchFromGitHub
, fetchpatch
, requests
, pythonOlder
}:

buildPythonPackage rec {
  pname = "pythonegardia";
  version = "1.0.51";
  format = "setuptools";

  disabled = pythonOlder "3.8";

  src = fetchFromGitHub {
    owner = "jeroenterheerdt";
    repo = "python-egardia";
    rev = "v${version}";
    sha256 = "7HindS++jcV3GRn/SKoTMpVOchOnLojy/TY0HZjtyD8=";
  };

  propagatedBuildInputs = [
    requests
  ];

  patches = [
    # Adjust search path, https://github.com/jeroenterheerdt/python-egardia/pull/33
    (fetchpatch {
      name = "search-path.patch";
      url = "https://github.com/jeroenterheerdt/python-egardia/commit/6b7bf5b7b2211e3557e0f438586b9d03b9bae440.patch";
      sha256 = "wUSfmF0SrKCITQJJsHgkGgPZFouaB/zbVqupK6fARHY=";
    })
  ];

  # Project has no tests, only two test file for manual interaction
  doCheck = false;

  pythonImportsCheck = [
    "pythonegardia"
  ];

  meta = with lib; {
    description = "Python interface with Egardia/Woonveilig alarms";
    homepage = "https://github.com/jeroenterheerdt/python-egardia";
    license = with licenses; [ mit ];
    maintainers = with maintainers; [ fab ];
  };
}