2021-05-06 23:47:26 +02:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, pkg-config
|
|
|
|
, openssl ? null
|
|
|
|
, gnutls ? null
|
|
|
|
, gmp
|
|
|
|
, libxml2
|
|
|
|
, stoken
|
|
|
|
, zlib
|
2020-12-02 20:24:12 +01:00
|
|
|
, vpnc-scripts
|
2020-12-10 02:53:04 +01:00
|
|
|
, PCSC
|
2021-05-06 23:47:26 +02:00
|
|
|
, head ? false
|
|
|
|
, fetchFromGitLab
|
|
|
|
, autoreconfHook
|
|
|
|
}:
|
2015-06-11 19:52:00 +02:00
|
|
|
|
2017-09-25 15:40:41 +02:00
|
|
|
assert (openssl != null) == (gnutls == null);
|
2013-05-31 20:19:56 +02:00
|
|
|
|
2020-12-02 20:24:12 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2021-05-06 23:47:26 +02: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";
|
|
|
|
};
|
2013-05-31 20:19:56 +02:00
|
|
|
|
2017-09-25 15:40:41 +02:00
|
|
|
outputs = [ "out" "dev" ];
|
2021-01-15 10:19:50 +01:00
|
|
|
|
2013-05-31 20:19:56 +02:00
|
|
|
configureFlags = [
|
2020-12-02 20:24:12 +01:00
|
|
|
"--with-vpnc-script=${vpnc-scripts}/bin/vpnc-script"
|
2013-05-31 20:19:56 +02:00
|
|
|
"--disable-nls"
|
2013-06-08 12:26:23 +02:00
|
|
|
"--without-openssl-version-check"
|
2013-05-31 20:19:56 +02:00
|
|
|
];
|
|
|
|
|
2019-10-18 10:16:31 +02:00
|
|
|
buildInputs = [ openssl gnutls gmp libxml2 stoken zlib ]
|
2020-12-10 02:53:04 +01:00
|
|
|
++ lib.optional stdenv.isDarwin PCSC;
|
2021-05-06 23:47:26 +02:00
|
|
|
nativeBuildInputs = [ pkg-config ]
|
|
|
|
++ lib.optional head autoreconfHook;
|
2016-08-02 18:06:29 +02:00
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2017-01-28 22:05:37 +01:00
|
|
|
description = "VPN Client for Cisco's AnyConnect SSL VPN";
|
2021-04-28 03:44:26 +02:00
|
|
|
homepage = "https://www.infradead.org/openconnect/";
|
2021-05-25 11:03:32 +02:00
|
|
|
license = licenses.lgpl21Only;
|
2019-10-18 10:16:31 +02:00
|
|
|
maintainers = with maintainers; [ pradeepchhetri tricktron ];
|
2021-01-15 14:21:58 +01:00
|
|
|
platforms = lib.platforms.linux ++ lib.platforms.darwin;
|
2016-08-02 18:06:29 +02:00
|
|
|
};
|
2013-05-31 20:19:56 +02:00
|
|
|
}
|