1{ lib
2, bleak
3, bleak-retry-connector
4, buildPythonPackage
5, cryptography
6, fetchFromGitHub
7, fetchpatch
8, pythonOlder
9, setuptools
10, wheel
11}:
12
13buildPythonPackage rec {
14 pname = "py-dormakaba-dkey";
15 version = "1.0.4";
16 format = "pyproject";
17
18 disabled = pythonOlder "3.10";
19
20 src = fetchFromGitHub {
21 owner = "emontnemery";
22 repo = pname;
23 rev = "refs/tags/${version}";
24 hash = "sha256-1jIsKQa27XNVievU02jjanRWFtJDYsHolgPBab6qpM0=";
25 };
26
27 patches = [
28 # https://github.com/emontnemery/py-dormakaba-dkey/pull/45
29 (fetchpatch {
30 name = "relax-setuptools-dependency.patch";
31 url = "https://github.com/emontnemery/py-dormakaba-dkey/commit/cfda4be71d39f2cfd1c0d4f7fff9018050c57f1a.patch";
32 hash = "sha256-JGsaLQNbUfz0uK/MeGnR2XTJDs4RnTOEg7BavfDPArg=";
33 })
34 ];
35
36 nativeBuildInputs = [
37 setuptools
38 wheel
39 ];
40
41 propagatedBuildInputs = [
42 bleak
43 bleak-retry-connector
44 cryptography
45 ];
46
47 # Module has no tests
48 doCheck = false;
49
50 pythonImportsCheck = [
51 "py_dormakaba_dkey"
52 ];
53
54 meta = with lib; {
55 description = "Library to interact with a Dormakaba dkey lock";
56 homepage = "https://github.com/emontnemery/py-dormakaba-dkey";
57 changelog = "https://github.com/emontnemery/py-dormakaba-dkey/releases/tag/${version}";
58 license = licenses.mit;
59 maintainers = with maintainers; [ fab ];
60 };
61}