pyudev: depend on udev instead of systemd

Pyudev depends only on a libudev implementation, rather than on
systemd-udevd specifically or on systemd generally.  Let's adjust the
dependency list to make it more specific.  In particular, this allows
pyudev to build and run with the overlay which substitutes eudev for
udev.

Pyudev is used by the auxiliary trackpad calibration tools included as
part of libinput.  Because an enormous number of packages depend on
libinput, this allows a very large number of packages to be used
without systemd.  Note that libinput.so does not depend on pyudev or
systemd -- only the trackpad calibration utilities bundled with
libudev use pyudev.
This commit is contained in:
Adam Joseph 2022-03-24 02:03:36 -07:00
parent e2f381b2f1
commit a05e926519
2 changed files with 3 additions and 3 deletions

View file

@ -1,5 +1,5 @@
{ lib, fetchPypi, buildPythonPackage
, six, systemd, pytest, mock, hypothesis, docutils
, six, udev, pytest, mock, hypothesis, docutils
}:
buildPythonPackage rec {
@ -13,7 +13,7 @@ buildPythonPackage rec {
postPatch = ''
substituteInPlace src/pyudev/_ctypeslib/utils.py \
--replace "find_library(name)" "'${lib.getLib systemd}/lib/libudev.so'"
--replace "find_library(name)" "'${lib.getLib udev}/lib/libudev.so'"
'';
checkInputs = [ pytest mock hypothesis docutils ];

View file

@ -8375,7 +8375,7 @@ in {
};
pyudev = callPackage ../development/python-modules/pyudev {
inherit (pkgs) systemd;
inherit (pkgs) udev;
};
pyunbound = callPackage ../tools/networking/unbound/python.nix { };