1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 beautifulsoup4,
6 enum-compat,
7 pyserial,
8 pynose,
9}:
10
11buildPythonPackage rec {
12 pname = "enocean";
13 version = "0.60.1";
14 format = "setuptools";
15
16 src = fetchFromGitHub {
17 owner = "kipe";
18 repo = "enocean";
19 rev = version;
20 sha256 = "0cbcvvy3qaqv8925z608qmkc1l914crzw79krwrz2vpm2fyribab";
21 };
22
23 propagatedBuildInputs = [
24 beautifulsoup4
25 enum-compat
26 pyserial
27 ];
28
29 nativeCheckInputs = [ pynose ];
30
31 checkPhase = ''
32 runHook preCheck
33
34 nosetests
35
36 runHook postCheck
37 '';
38
39 pythonImportsCheck = [
40 "enocean.communicators"
41 "enocean.protocol.packet"
42 "enocean.utils"
43 ];
44
45 meta = with lib; {
46 description = "EnOcean serial protocol implementation";
47 mainProgram = "enocean_example.py";
48 homepage = "https://github.com/kipe/enocean";
49 license = licenses.mit;
50 maintainers = with maintainers; [ dotlambda ];
51 };
52}