1{ lib, fetchurl, buildPythonPackage 2, six, systemd, pytest, mock, hypothesis, docutils 3}: 4 5buildPythonPackage rec { 6 pname = "pyudev"; 7 name = "${pname}-${version}"; 8 version = "0.21.0"; 9 10 src = fetchurl { 11 url = "mirror://pypi/p/pyudev/${name}.tar.gz"; 12 sha256 = "0arz0dqp75sszsmgm6vhg92n1lsx91ihddx3m944f4ah0487ljq9"; 13 }; 14 15 postPatch = '' 16 substituteInPlace src/pyudev/_ctypeslib/utils.py \ 17 --replace "find_library(name)" "'${systemd.lib}/lib/libudev.so'" 18 ''; 19 20 buildInputs = [ pytest mock hypothesis docutils ]; 21 propagatedBuildInputs = [ systemd six ]; 22 23 checkPhase = '' 24 py.test 25 ''; 26 27 # Bunch of failing tests 28 # https://github.com/pyudev/pyudev/issues/187 29 doCheck = false; 30 31 meta = { 32 homepage = http://pyudev.readthedocs.org/; 33 description = "Pure Python libudev binding"; 34 license = lib.licenses.lgpl21Plus; 35 }; 36}