1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 fetchpatch2,
6 setuptools,
7 beautifulsoup4,
8 enum-compat,
9 pyserial,
10 pytestCheckHook,
11}:
12
13buildPythonPackage rec {
14 pname = "enocean";
15 version = "0.60.1";
16 pyproject = true;
17
18 src = fetchFromGitHub {
19 owner = "kipe";
20 repo = "enocean";
21 rev = "refs/tags/${version}";
22 hash = "sha256-S62YvRP1bvEzzzMd/jMjIdHAZsUImF9EQhsrPPzebDE=";
23 };
24
25 patches = [
26 (fetchpatch2 {
27 name = "replace-nose-with-pytest.patch";
28 url = "https://github.com/kipe/enocean/commit/e5ca3b70f0920f129219c980ad549d7f3a4576de.patch";
29 hash = "sha256-cDBvI0I4W5YkGTpg+rKy08TUAmKlhKa/5+Muou9iArs=";
30 })
31 ];
32
33 build-system = [ setuptools ];
34
35 dependencies = [
36 beautifulsoup4
37 enum-compat
38 pyserial
39 ];
40
41 nativeCheckInputs = [ pytestCheckHook ];
42
43 pythonImportsCheck = [
44 "enocean.communicators"
45 "enocean.protocol.packet"
46 "enocean.utils"
47 ];
48
49 meta = with lib; {
50 changelog = "https://github.com/kipe/enocean/releases/tag/${version}";
51 description = "EnOcean serial protocol implementation";
52 mainProgram = "enocean_example.py";
53 homepage = "https://github.com/kipe/enocean";
54 license = licenses.mit;
55 maintainers = with maintainers; [ dotlambda ];
56 };
57}