pcsclite: make dbusSupport optional

This commit is contained in:
Adam Joseph 2024-04-15 13:09:13 -07:00 committed by Florian Klink
parent dec7ebf0cd
commit a87a075306

View File

@ -10,6 +10,7 @@
, dbus , dbus
, polkit , polkit
, systemdLibs , systemdLibs
, dbusSupport ? stdenv.isLinux
, systemdSupport ? stdenv.isLinux , systemdSupport ? stdenv.isLinux
, IOKit , IOKit
, testers , testers
@ -18,6 +19,9 @@
, polkitSupport ? false , polkitSupport ? false
}: }:
assert polkitSupport -> dbusSupport;
assert systemdSupport -> dbusSupport;
stdenv.mkDerivation (finalAttrs: { stdenv.mkDerivation (finalAttrs: {
inherit pname; inherit pname;
version = "2.1.0"; version = "2.1.0";
@ -73,7 +77,8 @@ stdenv.mkDerivation (finalAttrs: {
buildInputs = [ python3 ] buildInputs = [ python3 ]
++ lib.optionals systemdSupport [ systemdLibs ] ++ lib.optionals systemdSupport [ systemdLibs ]
++ lib.optionals stdenv.isDarwin [ IOKit ] ++ lib.optionals stdenv.isDarwin [ IOKit ]
++ lib.optionals polkitSupport [ dbus polkit ]; ++ lib.optionals dbusSupport [ dbus ]
++ lib.optionals polkitSupport [ polkit ];
passthru = { passthru = {
tests = { tests = {