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 }:
stdenv.mkDerivation rec {
@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ autoreconfHook pkgconfig ];
buildInputs = [ ]
++ stdenv.lib.optionals stdenv.isLinux [ libusb1 systemd ];
++ stdenv.lib.optionals stdenv.isLinux [ libusb1 udev ];
enableParallelBuilding = true;

View file

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

View file

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