openconnect: fix build on darwin

by only including pcsclite on linux.
This commit is contained in:
Thibault Gagnaux 2024-07-31 14:56:49 +08:00
parent 23324f86c5
commit 230fcec81e
No known key found for this signature in database
GPG Key ID: 44BD0764ACAE8E25

View File

@ -21,7 +21,7 @@
, autoreconfHook
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation {
pname = "openconnect";
inherit version src;
@ -33,9 +33,9 @@ stdenv.mkDerivation rec {
"--without-openssl-version-check"
];
buildInputs = [ gmp libxml2 stoken zlib pcsclite (if useOpenSSL then openssl else gnutls) ]
buildInputs = [ gmp libxml2 stoken zlib (if useOpenSSL then openssl else gnutls) ]
++ lib.optional stdenv.isDarwin PCSC
++ lib.optional stdenv.isLinux p11-kit
++ lib.optionals stdenv.isLinux [ p11-kit pcsclite ]
++ lib.optional useDefaultExternalBrowser xdg-utils;
nativeBuildInputs = [ pkg-config autoreconfHook ];