2021-05-28 09:39:13 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, pkg-config
|
|
|
|
, openssl ? null
|
|
|
|
, gnutls ? null
|
|
|
|
, gmp
|
|
|
|
, libxml2
|
|
|
|
, stoken
|
|
|
|
, zlib
|
2021-06-28 23:13:55 +00:00
|
|
|
, vpnc-scripts
|
|
|
|
, PCSC
|
2021-05-28 09:39:13 +00:00
|
|
|
, head ? false
|
|
|
|
, fetchFromGitLab
|
|
|
|
, autoreconfHook
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
assert (openssl != null) == (gnutls == null);
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2021-05-28 09:39:13 +00:00
|
|
|
pname = "openconnect${lib.optionalString head "-head"}";
|
|
|
|
version = if head then "2021-05-05" else "8.10";
|
|
|
|
|
|
|
|
src =
|
|
|
|
if head then fetchFromGitLab {
|
|
|
|
owner = "openconnect";
|
|
|
|
repo = "openconnect";
|
|
|
|
rev = "684f6db1aef78e61e01f511c728bf658c30b9114";
|
|
|
|
sha256 = "0waclawcymgd8sq9xbkn2q8mnqp4pd0gpyv5wrnb7i0nsv860wz8";
|
|
|
|
}
|
|
|
|
else fetchurl {
|
|
|
|
url = "ftp://ftp.infradead.org/pub/openconnect/${pname}-${version}.tar.gz";
|
|
|
|
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 = [
|
2021-06-28 23:13:55 +00:00
|
|
|
"--with-vpnc-script=${vpnc-scripts}/bin/vpnc-script"
|
2020-04-24 23:36:52 +00:00
|
|
|
"--disable-nls"
|
|
|
|
"--without-openssl-version-check"
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [ openssl gnutls gmp libxml2 stoken zlib ]
|
2021-06-28 23:13:55 +00:00
|
|
|
++ lib.optional stdenv.isDarwin PCSC;
|
2021-05-28 09:39:13 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ]
|
|
|
|
++ lib.optional head autoreconfHook;
|
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";
|
2021-06-28 23:13:55 +00:00
|
|
|
homepage = "https://www.infradead.org/openconnect/";
|
2021-05-28 09:39:13 +00:00
|
|
|
license = licenses.lgpl21Only;
|
2020-04-24 23:36:52 +00:00
|
|
|
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
|
|
|
};
|
|
|
|
}
|