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