From a05e9265190ea726cea2db77bfb7631ad6189655 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Thu, 24 Mar 2022 02:03:36 -0700 Subject: [PATCH] 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. --- pkgs/development/python-modules/pyudev/default.nix | 4 ++-- pkgs/top-level/python-packages.nix | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/pyudev/default.nix b/pkgs/development/python-modules/pyudev/default.nix index aabf9cd5de5..89cd50f085f 100644 --- a/pkgs/development/python-modules/pyudev/default.nix +++ b/pkgs/development/python-modules/pyudev/default.nix @@ -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 ]; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 0f4a3a9fba5..a79e2241179 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -8375,7 +8375,7 @@ in { }; pyudev = callPackage ../development/python-modules/pyudev { - inherit (pkgs) systemd; + inherit (pkgs) udev; }; pyunbound = callPackage ../tools/networking/unbound/python.nix { };