1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, fetchpatch
5, requests
6, pythonOlder
7}:
8
9buildPythonPackage rec {
10 pname = "pythonegardia";
11 version = "1.0.51";
12 format = "setuptools";
13
14 disabled = pythonOlder "3.8";
15
16 src = fetchFromGitHub {
17 owner = "jeroenterheerdt";
18 repo = "python-egardia";
19 rev = "v${version}";
20 sha256 = "7HindS++jcV3GRn/SKoTMpVOchOnLojy/TY0HZjtyD8=";
21 };
22
23 propagatedBuildInputs = [
24 requests
25 ];
26
27 patches = [
28 # Adjust search path, https://github.com/jeroenterheerdt/python-egardia/pull/33
29 (fetchpatch {
30 name = "search-path.patch";
31 url = "https://github.com/jeroenterheerdt/python-egardia/commit/6b7bf5b7b2211e3557e0f438586b9d03b9bae440.patch";
32 sha256 = "wUSfmF0SrKCITQJJsHgkGgPZFouaB/zbVqupK6fARHY=";
33 })
34 ];
35
36 # Project has no tests, only two test file for manual interaction
37 doCheck = false;
38
39 pythonImportsCheck = [
40 "pythonegardia"
41 ];
42
43 meta = with lib; {
44 description = "Python interface with Egardia/Woonveilig alarms";
45 homepage = "https://github.com/jeroenterheerdt/python-egardia";
46 license = with licenses; [ mit ];
47 maintainers = with maintainers; [ fab ];
48 };
49}