openconnect: disable useDefaultExternalBrowser when cross

xdg-utils depends on perl packages and those don't cross-compile
This commit is contained in:
Artturin 2023-02-12 19:28:29 +02:00
parent 135ac51fbf
commit a81a9cbf12

View file

@ -15,7 +15,7 @@
, zlib , zlib
, vpnc-scripts , vpnc-scripts
, PCSC , PCSC
, useDefaultExternalBrowser ? true , useDefaultExternalBrowser ? stdenv.isLinux && stdenv.buildPlatform == stdenv.hostPlatform # xdg-utils doesn't cross-compile
, xdg-utils , xdg-utils
, autoreconfHook , autoreconfHook
}: }:
@ -35,7 +35,7 @@ stdenv.mkDerivation rec {
buildInputs = [ gmp libxml2 stoken zlib (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.isDarwin PCSC
++ lib.optional stdenv.isLinux p11-kit ++ lib.optional stdenv.isLinux p11-kit
++ lib.optional (stdenv.isLinux && useDefaultExternalBrowser) xdg-utils; ++ lib.optional useDefaultExternalBrowser xdg-utils;
nativeBuildInputs = [ pkg-config autoreconfHook ]; nativeBuildInputs = [ pkg-config autoreconfHook ];
meta = with lib; { meta = with lib; {