2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, pkg-config, openssl ? null, gnutls ? null, gmp, libxml2, stoken, zlib, fetchgit, darwin } :
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
assert (openssl != null) == (gnutls == null);
|
|
|
|
|
|
|
|
let vpnc = fetchgit {
|
|
|
|
url = "git://git.infradead.org/users/dwmw2/vpnc-scripts.git";
|
2020-05-29 06:06:01 +00:00
|
|
|
rev = "c0122e891f7e033f35f047dad963702199d5cb9e";
|
|
|
|
sha256 = "11b1ls012mb704jphqxjmqrfbbhkdjb64j2q4k8wb5jmja8jnd14";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
in stdenv.mkDerivation rec {
|
|
|
|
pname = "openconnect";
|
2020-05-29 06:06:01 +00:00
|
|
|
version = "8.10";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
urls = [
|
|
|
|
"ftp://ftp.infradead.org/pub/openconnect/${pname}-${version}.tar.gz"
|
|
|
|
];
|
2020-05-29 06:06:01 +00:00
|
|
|
sha256 = "1cdsx4nsrwawbsisfkldfc9i4qn60g03vxb13nzppr2br9p4rrih";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
outputs = [ "out" "dev" ];
|
2021-01-15 22:18:51 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--with-vpnc-script=${vpnc}/vpnc-script"
|
|
|
|
"--disable-nls"
|
|
|
|
"--without-openssl-version-check"
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [ openssl gnutls gmp libxml2 stoken zlib ]
|
2021-01-15 22:18:51 +00:00
|
|
|
++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.PCSC;
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "VPN Client for Cisco's AnyConnect SSL VPN";
|
|
|
|
homepage = "http://www.infradead.org/openconnect/";
|
|
|
|
license = licenses.lgpl21;
|
|
|
|
maintainers = with maintainers; [ pradeepchhetri tricktron ];
|
2021-01-17 00:15:33 +00:00
|
|
|
platforms = lib.platforms.linux ++ lib.platforms.darwin;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|