Skip to content

Commit

Permalink
udev: set to libudev-zero on static linux
Browse files Browse the repository at this point in the history
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]: systemd/systemd#20600 (comment)
  • Loading branch information
alyssais committed Jan 11, 2023
1 parent 94ba105 commit d8efc82
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26249,7 +26249,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 { };

Expand Down

0 comments on commit d8efc82

Please sign in to comment.