From dd8a787d4a7eef385a02ef9795a4d28108bc4051 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Wed, 11 Jan 2023 23:39:46 +0000 Subject: [PATCH] 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 --- pkgs/top-level/all-packages.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 48bfcec9335e..ae83f1e25b6f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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 { };