Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / pyudev / default.nix
blob8c3c0d86f3b8c0fed20ba580fac56010ec025949
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";
17   src = fetchPypi {
18     inherit pname version;
19     hash = "sha256-deVNNyGPWsRbDaHw/ZzF5SajysPvHPrUEM96sziwFHE=";
20   };
22   postPatch = lib.optionalString stdenvNoCC.isLinux ''
23     substituteInPlace src/pyudev/_ctypeslib/utils.py \
24       --replace "find_library(name)" "'${lib.getLib udev}/lib/libudev.so'"
25     '';
27   nativeCheckInputs = [ pytest mock hypothesis docutils ];
28   propagatedBuildInputs = [ six ];
30   checkPhase = ''
31     py.test
32   '';
34   # Bunch of failing tests
35   # https://github.com/pyudev/pyudev/issues/187
36   doCheck = false;
38   meta = with lib; {
39     homepage = "https://pyudev.readthedocs.org/";
40     description = "Pure Python libudev binding";
41     license = licenses.lgpl21Plus;
42     maintainers = with maintainers; [ frogamic ];
43   };