pcsclite: make udevSupport optional
This commit allows the use of pcscd on platforms which use mdevd and libudev-zero instead of systemd-udevd. When udevd is not running, pcscd needs to link against libusb so that it can scan the USB busses itself, rather than relying on udevd to do that.
This commit is contained in:
committed by
Florian Klink
parent
a87a075306
commit
2c387ccce1
@@ -12,6 +12,8 @@
|
||||
, systemdLibs
|
||||
, dbusSupport ? stdenv.isLinux
|
||||
, systemdSupport ? stdenv.isLinux
|
||||
, udevSupport ? dbusSupport
|
||||
, libusb1
|
||||
, IOKit
|
||||
, testers
|
||||
, nix-update-script
|
||||
@@ -45,6 +47,8 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
"--enable-ipcdir=/run/pcscd"
|
||||
] ++ lib.optionals systemdSupport [
|
||||
"--with-systemdsystemunitdir=${placeholder "out"}/lib/systemd/system"
|
||||
] ++ lib.optionals (!udevSupport) [
|
||||
"--disable-libudev"
|
||||
];
|
||||
|
||||
makeFlags = [
|
||||
@@ -78,7 +82,8 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
++ lib.optionals systemdSupport [ systemdLibs ]
|
||||
++ lib.optionals stdenv.isDarwin [ IOKit ]
|
||||
++ lib.optionals dbusSupport [ dbus ]
|
||||
++ lib.optionals polkitSupport [ polkit ];
|
||||
++ lib.optionals polkitSupport [ polkit ]
|
||||
++ lib.optionals (!udevSupport) [ libusb1 ];
|
||||
|
||||
passthru = {
|
||||
tests = {
|
||||
|
||||
Reference in New Issue
Block a user