udev: set to libudev-zero on static linux

systemd does not support being built statically[1], which means that,
prior to this patch, nothing that depends on udev can be built
statically.  libudev-zero is a daemonless implementation of libudev,
that supports being built statically.  So, by setting udev to be
libudev-zero when systemd is unavailable, we can get static builds of
packages like linuxPackages.usbip.

[1]: https://github.com/systemd/systemd/issues/20600#issuecomment-912338965
This commit is contained in:
Alyssa Ross
2023-01-18 12:12:14 +00:00
parent 7dacba80c6
commit dd8a787d4a
+3 -1
View File
@@ -26350,7 +26350,9 @@ with pkgs;
};
udev = systemd; # TODO: change to systemdMinimal
udev =
if (with stdenv.hostPlatform; isLinux && isStatic) then libudev-zero
else systemd; # TODO: change to systemdMinimal
systemd-wait = callPackage ../os-specific/linux/systemd-wait { };