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