2021-01-17 04:51:22 +01:00
|
|
|
{ lib, stdenv, fetchurl, pkg-config, openssl ? null, gnutls ? null, gmp, libxml2, stoken, zlib, fetchgit, darwin } :
|
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
|
|
|
|
2019-10-18 10:16:31 +02:00
|
|
|
let vpnc = fetchgit {
|
|
|
|
url = "git://git.infradead.org/users/dwmw2/vpnc-scripts.git";
|
2020-05-19 00:06:13 +02:00
|
|
|
rev = "c0122e891f7e033f35f047dad963702199d5cb9e";
|
|
|
|
sha256 = "11b1ls012mb704jphqxjmqrfbbhkdjb64j2q4k8wb5jmja8jnd14";
|
2019-10-18 10:16:31 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
in stdenv.mkDerivation rec {
|
2019-01-16 15:58:56 +01:00
|
|
|
pname = "openconnect";
|
2020-05-19 00:06:13 +02:00
|
|
|
version = "8.10";
|
2013-05-31 20:19:56 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
urls = [
|
2019-01-16 15:58:56 +01:00
|
|
|
"ftp://ftp.infradead.org/pub/openconnect/${pname}-${version}.tar.gz"
|
2013-05-31 20:19:56 +02:00
|
|
|
];
|
2020-05-19 00:06:13 +02:00
|
|
|
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 = [
|
2019-10-18 10:16:31 +02:00
|
|
|
"--with-vpnc-script=${vpnc}/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 ]
|
2021-01-15 10:19:50 +01:00
|
|
|
++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.PCSC;
|
2021-01-17 04:51:22 +01:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
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";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "http://www.infradead.org/openconnect/";
|
2019-10-18 10:16:31 +02:00
|
|
|
license = licenses.lgpl21;
|
|
|
|
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
|
|
|
}
|