Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / pyudev / default.nix
blob685da38ed2f1860be757e293d469193e92782503
1 { lib
2 , fetchPypi
3 , buildPythonPackage
4 , six
5 , udev
6 , pytest
7 , mock
8 , hypothesis
9 , docutils
10 , stdenvNoCC
13 buildPythonPackage rec {
14   pname = "pyudev";
15   version = "0.24.1";
16   format = "setuptools";
18   src = fetchPypi {
19     inherit pname version;
20     hash = "sha256-deVNNyGPWsRbDaHw/ZzF5SajysPvHPrUEM96sziwFHE=";
21   };
23   postPatch = lib.optionalString stdenvNoCC.isLinux ''
24     substituteInPlace src/pyudev/_ctypeslib/utils.py \
25       --replace "find_library(name)" "'${lib.getLib udev}/lib/libudev.so'"
26     '';
28   nativeCheckInputs = [ pytest mock hypothesis docutils ];
29   propagatedBuildInputs = [ six ];
31   checkPhase = ''
32     py.test
33   '';
35   # Bunch of failing tests
36   # https://github.com/pyudev/pyudev/issues/187
37   doCheck = false;
39   meta = with lib; {
40     homepage = "https://pyudev.readthedocs.org/";
41     description = "Pure Python libudev binding";
42     license = licenses.lgpl21Plus;
43     maintainers = with maintainers; [ frogamic ];
44   };