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.9";
9
10 disabled = !isPy3k;
11
12 src = fetchPypi {
13 inherit pname version;
14 sha256 = "97ddd104f52e3a4d7115c3de5d2136631d1f66627fc9b45d56956c3f2b6e0cdb";
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}