about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/enocean/default.nix
blob: 925c87ed3f8ebc15573f2454888273603ccc1184 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{ lib
, buildPythonPackage
, fetchFromGitHub
, beautifulsoup4
, enum-compat
, pyserial
, pynose
}:

buildPythonPackage rec {
  pname = "enocean";
  version = "0.60.1";
  format = "setuptools";

  src = fetchFromGitHub {
    owner = "kipe";
    repo = "enocean";
    rev = version;
    sha256 = "0cbcvvy3qaqv8925z608qmkc1l914crzw79krwrz2vpm2fyribab";
  };

  propagatedBuildInputs = [
    beautifulsoup4
    enum-compat
    pyserial
  ];

  nativeCheckInputs = [
    pynose
  ];

  checkPhase = ''
    runHook preCheck

    nosetests

    runHook postCheck
  '';

  pythonImportsCheck = [
    "enocean.communicators"
    "enocean.protocol.packet"
    "enocean.utils"
  ];

  meta = with lib; {
    description = "EnOcean serial protocol implementation";
    mainProgram = "enocean_example.py";
    homepage = "https://github.com/kipe/enocean";
    license = licenses.mit;
    maintainers = with maintainers; [ dotlambda ];
  };
}