Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at r-updates 63 lines 1.3 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchPypi, 5 isPy3k, 6 pkg-config, 7 libyaml, 8 openzwave, 9 cython, 10 pyserial, 11 six, 12 pydispatcher, 13 urwid, 14}: 15 16buildPythonPackage rec { 17 pname = "python-openzwave"; 18 version = "0.4.19"; 19 format = "setuptools"; 20 21 disabled = !isPy3k; 22 23 src = fetchPypi { 24 pname = "python_openzwave"; 25 inherit version; 26 sha256 = "6b40c7711383eeb3535cf5504f1cf47cc1ac7018eb820f299642a5a2795aef84"; 27 extension = "zip"; 28 }; 29 30 nativeBuildInputs = [ pkg-config ]; 31 buildInputs = [ 32 libyaml 33 openzwave 34 cython 35 ]; 36 propagatedBuildInputs = [ 37 six 38 urwid 39 pydispatcher 40 pyserial 41 ]; 42 43 # primary location for the .xml files is in /etc/openzwave so we override the 44 # /usr/local/etc lookup instead as that allows us to dump new .xml files into 45 # /etc/openzwave if needed 46 postPatch = '' 47 substituteInPlace src-lib/libopenzwave/libopenzwave.pyx \ 48 --replace /usr/local/etc/openzwave ${openzwave}/etc/openzwave 49 ''; 50 51 patches = [ ./cython.patch ]; 52 53 # no tests available 54 doCheck = false; 55 56 meta = { 57 description = "Python wrapper for the OpenZWave C++ library"; 58 homepage = "https://github.com/OpenZWave/python-openzwave"; 59 license = lib.licenses.gpl3Plus; 60 maintainers = [ ]; 61 inherit (openzwave.meta) platforms; 62 }; 63}