2022-04-15 01:41:22 +00:00
|
|
|
{ version
|
|
|
|
, src
|
|
|
|
}:
|
|
|
|
|
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, pkg-config
|
|
|
|
, gnutls
|
2022-04-27 09:35:20 +00:00
|
|
|
, p11-kit
|
2022-04-15 01:41:22 +00:00
|
|
|
, openssl
|
|
|
|
, useOpenSSL ? false
|
|
|
|
, gmp
|
|
|
|
, libxml2
|
|
|
|
, stoken
|
|
|
|
, zlib
|
|
|
|
, vpnc-scripts
|
|
|
|
, PCSC
|
2023-02-16 17:41:37 +00:00
|
|
|
, useDefaultExternalBrowser ? stdenv.isLinux && stdenv.buildPlatform == stdenv.hostPlatform # xdg-utils doesn't cross-compile
|
2023-02-02 18:25:31 +00:00
|
|
|
, xdg-utils
|
2022-04-15 01:41:22 +00:00
|
|
|
, autoreconfHook
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "openconnect";
|
|
|
|
inherit version src;
|
|
|
|
|
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--with-vpnc-script=${vpnc-scripts}/bin/vpnc-script"
|
|
|
|
"--disable-nls"
|
|
|
|
"--without-openssl-version-check"
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [ gmp libxml2 stoken zlib (if useOpenSSL then openssl else gnutls) ]
|
2022-04-27 09:35:20 +00:00
|
|
|
++ lib.optional stdenv.isDarwin PCSC
|
2023-02-02 18:25:31 +00:00
|
|
|
++ lib.optional stdenv.isLinux p11-kit
|
2023-02-16 17:41:37 +00:00
|
|
|
++ lib.optional useDefaultExternalBrowser xdg-utils;
|
2022-04-15 01:41:22 +00:00
|
|
|
nativeBuildInputs = [ pkg-config autoreconfHook ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "VPN Client for Cisco's AnyConnect SSL VPN";
|
|
|
|
homepage = "https://www.infradead.org/openconnect/";
|
|
|
|
license = licenses.lgpl21Only;
|
|
|
|
maintainers = with maintainers; [ pradeepchhetri tricktron alyaeanyx ];
|
|
|
|
platforms = lib.platforms.unix;
|
2024-02-29 20:09:43 +00:00
|
|
|
mainProgram = "openconnect";
|
2022-04-15 01:41:22 +00:00
|
|
|
};
|
|
|
|
}
|