top-level: Use `systemdMinimal` in a few more places

This commit is contained in:
Finn Behrens 2020-10-10 12:05:31 +02:00 committed by John Ericson
parent be6e50a3ae
commit cb764dbc24
3 changed files with 20 additions and 11 deletions

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, systemd, libusb1 { stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, udev, libusb1
, darwin }: , darwin }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ autoreconfHook pkgconfig ]; nativeBuildInputs = [ autoreconfHook pkgconfig ];
buildInputs = [ ] buildInputs = [ ]
++ stdenv.lib.optionals stdenv.isLinux [ libusb1 systemd ]; ++ stdenv.lib.optionals stdenv.isLinux [ libusb1 udev ];
enableParallelBuilding = true; enableParallelBuilding = true;

View File

@ -2,14 +2,14 @@
, fetchFromGitHub , fetchFromGitHub
, autoreconfHook , autoreconfHook
, pkgconfig , pkgconfig
, enableSystemd ? stdenv.isLinux && !stdenv.hostPlatform.isMusl , enableUdev ? stdenv.isLinux && !stdenv.hostPlatform.isMusl
, systemd ? null , udev ? null
, libobjc , libobjc
, IOKit , IOKit
, withStatic ? false , withStatic ? false
}: }:
assert enableSystemd -> systemd != null; assert enableUdev -> udev != null;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "libusb"; pname = "libusb";
@ -26,15 +26,15 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkgconfig autoreconfHook ]; nativeBuildInputs = [ pkgconfig autoreconfHook ];
propagatedBuildInputs = propagatedBuildInputs =
stdenv.lib.optional enableSystemd systemd ++ stdenv.lib.optional enableUdev udev ++
stdenv.lib.optionals stdenv.isDarwin [ libobjc IOKit ]; stdenv.lib.optionals stdenv.isDarwin [ libobjc IOKit ];
dontDisableStatic = withStatic; dontDisableStatic = withStatic;
configureFlags = stdenv.lib.optional (!enableSystemd) "--disable-udev"; configureFlags = stdenv.lib.optional (!enableUdev) "--disable-udev";
preFixup = stdenv.lib.optionalString enableSystemd '' preFixup = stdenv.lib.optionalString enableUdev ''
sed 's,-ludev,-L${stdenv.lib.getLib systemd}/lib -ludev,' -i $out/lib/libusb-1.0.la sed 's,-ludev,-L${stdenv.lib.getLib udev}/lib -ludev,' -i $out/lib/libusb-1.0.la
''; '';
meta = with stdenv.lib; { meta = with stdenv.lib; {

View File

@ -13126,7 +13126,10 @@ in
herqq = libsForQt514.callPackage ../development/libraries/herqq { }; herqq = libsForQt514.callPackage ../development/libraries/herqq { };
hidapi = callPackage ../development/libraries/hidapi { }; hidapi = callPackage ../development/libraries/hidapi {
# TODO: remove once `udev` is `systemdMinimal` everywhere.
udev = systemdMinimal;
};
highfive = callPackage ../development/libraries/highfive { }; highfive = callPackage ../development/libraries/highfive { };
@ -13703,7 +13706,9 @@ in
libfakekey = callPackage ../development/libraries/libfakekey { }; libfakekey = callPackage ../development/libraries/libfakekey { };
libfido2 = callPackage ../development/libraries/libfido2 { }; libfido2 = callPackage ../development/libraries/libfido2 {
udev = systemdMinimal;
};
libfilezilla = callPackage ../development/libraries/libfilezilla { libfilezilla = callPackage ../development/libraries/libfilezilla {
inherit (darwin.apple_sdk.frameworks) ApplicationServices; inherit (darwin.apple_sdk.frameworks) ApplicationServices;
@ -14394,6 +14399,8 @@ in
libusb1 = callPackage ../development/libraries/libusb1 { libusb1 = callPackage ../development/libraries/libusb1 {
inherit (darwin) libobjc; inherit (darwin) libobjc;
inherit (darwin.apple_sdk.frameworks) IOKit; inherit (darwin.apple_sdk.frameworks) IOKit;
# TODO: remove once `udev` is `systemdMinimal` everywhere.
udev = systemdMinimal;
}; };
libusbmuxd = callPackage ../development/libraries/libusbmuxd { }; libusbmuxd = callPackage ../development/libraries/libusbmuxd { };
@ -18834,6 +18841,8 @@ in
glib = null; glib = null;
libgcrypt = null; libgcrypt = null;
lvm2 = null; lvm2 = null;
libfido2 = null;
p11-kit = null;
}; };