linux_xanmod: 5.11.14 -> 5.11.15
[NixPkgs.git] / pkgs / development / python-modules / pyudev / default.nix
blobaabf9cd5de521d343975cb61d3653f3eeee310ca
1 { lib, fetchPypi, buildPythonPackage
2 , six, systemd, pytest, mock, hypothesis, docutils
3 }:
5 buildPythonPackage rec {
6   pname = "pyudev";
7   version = "0.22.0";
9   src = fetchPypi {
10     inherit pname version;
11     sha256 = "0xmj6l08iih2js9skjqpv4w7y0dhxyg91zmrs6v5aa65gbmipfv9";
12   };
14   postPatch = ''
15     substituteInPlace src/pyudev/_ctypeslib/utils.py \
16       --replace "find_library(name)" "'${lib.getLib systemd}/lib/libudev.so'"
17     '';
19   checkInputs = [ pytest mock hypothesis docutils ];
20   propagatedBuildInputs = [ six ];
22   checkPhase = ''
23     py.test
24   '';
26   # Bunch of failing tests
27   # https://github.com/pyudev/pyudev/issues/187
28   doCheck = false;
30   meta = {
31     homepage = "https://pyudev.readthedocs.org/";
32     description = "Pure Python libudev binding";
33     license = lib.licenses.lgpl21Plus;
34   };