1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, beautifulsoup4
5, enum-compat
6, pyserial
7, nose
8}:
9
10buildPythonPackage rec {
11 pname = "enocean";
12 version = "0.60.1";
13
14 src = fetchFromGitHub {
15 owner = "kipe";
16 repo = "enocean";
17 rev = version;
18 sha256 = "0cbcvvy3qaqv8925z608qmkc1l914crzw79krwrz2vpm2fyribab";
19 };
20
21 propagatedBuildInputs = [
22 beautifulsoup4
23 enum-compat
24 pyserial
25 ];
26
27 checkInputs = [
28 nose
29 ];
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 homepage = "https://github.com/kipe/enocean";
48 license = licenses.mit;
49 maintainers = with maintainers; [ dotlambda ];
50 };
51}