1{ lib, buildPythonPackage, fetchPypi, isPy3k 2, pkg-config 3, systemd, libyaml, openzwave, cython, pyserial 4, six, pydispatcher, urwid }: 5 6buildPythonPackage rec { 7 pname = "python_openzwave"; 8 version = "0.4.19"; 9 10 disabled = !isPy3k; 11 12 src = fetchPypi { 13 inherit pname version; 14 sha256 = "6b40c7711383eeb3535cf5504f1cf47cc1ac7018eb820f299642a5a2795aef84"; 15 extension = "zip"; 16 }; 17 18 nativeBuildInputs = [ pkg-config ]; 19 buildInputs = [ systemd libyaml openzwave cython ]; 20 propagatedBuildInputs = [ six urwid pydispatcher pyserial ]; 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 patches = [ ./cython.patch ]; 31 32 # no tests available 33 doCheck = false; 34 35 meta = with lib; { 36 description = "Python wrapper for the OpenZWave C++ library"; 37 homepage = "https://github.com/OpenZWave/python-openzwave"; 38 license = licenses.gpl3Plus; 39 maintainers = with maintainers; [ ]; 40 inherit (openzwave.meta) platforms; 41 }; 42}