1{ stdenv, buildPythonPackage, fetchPypi, isPy3k
2, pkgconfig
3, systemd, libyaml, openzwave, cython
4, six, pydispatcher, urwid }:
5
6buildPythonPackage rec {
7 pname = "python_openzwave";
8 version = "0.4.18";
9
10 disabled = !isPy3k;
11
12 src = fetchPypi {
13 inherit pname version;
14 sha256 = "f7b6b4e34e2a64d0a0bd0556f5560ca6914ca72428c3fe5ac8c7f08b31335f3e";
15 extension = "zip";
16 };
17
18 nativeBuildInputs = [ pkgconfig ];
19 buildInputs = [ systemd libyaml openzwave cython ];
20 propagatedBuildInputs = [ six urwid pydispatcher ];
21
22 # primary location for the .xml files is in /etc/openzwave so we override the
23 # /usr/local/etc lookup instead as that allows us to dump new .xml files into
24 # /etc/openzwave if needed
25 postPatch = ''
26 substituteInPlace src-lib/libopenzwave/libopenzwave.pyx \
27 --replace /usr/local/etc/openzwave ${openzwave}/etc/openzwave
28 '';
29
30 # no tests available
31 doCheck = false;
32
33 meta = with stdenv.lib; {
34 description = "Python wrapper for the OpenZWave C++ library";
35 homepage = https://github.com/OpenZWave/python-openzwave;
36 license = licenses.gpl3Plus;
37 maintainers = with maintainers; [ etu ];
38 inherit (openzwave.meta) platforms;
39 };
40}