@@ -1,4 +1,19 @@
1−{ lib, stdenv, fetchurl, pkg-config, openssl ? null, gnutls ? null, gmp, libxml2, stoken, zlib, fetchgit, darwin } :
1+{ lib
2+, stdenv
3+, fetchurl
4+, pkg-config
5+, openssl ? null
6+, gnutls ? null
7+, gmp
8+, libxml2
9+, stoken
10+, zlib
11+, fetchgit
12+, darwin
13+, head ? false
14+ , fetchFromGitLab
15+ , autoreconfHook
16+}:
217
318assert (openssl != null) == (gnutls == null);
419
@@ -9,15 +24,20 @@ let vpnc = fetchgit {
924};
1025
1126in stdenv.mkDerivation rec {
12− pname = "openconnect";
13− version = "8.10";
14−
15− src = fetchurl {
16− urls = [
17− "ftp://ftp.infradead.org/pub/openconnect/${pname}-${version}.tar.gz"
18− ];
19− sha256 = "1cdsx4nsrwawbsisfkldfc9i4qn60g03vxb13nzppr2br9p4rrih";
20− };
27+ pname = "openconnect${lib.optionalString head "-head"}";
28+ version = if head then "2021-05-05" else "8.10";
29+
30+ src =
31+ if head then fetchFromGitLab {
32+ owner = "openconnect";
33+ repo = "openconnect";
34+ rev = "684f6db1aef78e61e01f511c728bf658c30b9114";
35+ sha256 = "0waclawcymgd8sq9xbkn2q8mnqp4pd0gpyv5wrnb7i0nsv860wz8";
36+ }
37+ else fetchurl {
38+ url = "ftp://ftp.infradead.org/pub/openconnect/${pname}-${version}.tar.gz";
39+ sha256 = "1cdsx4nsrwawbsisfkldfc9i4qn60g03vxb13nzppr2br9p4rrih";
40+ };
2141
2242 outputs = [ "out" "dev" ];
2343
@@ -29,12 +49,13 @@ in stdenv.mkDerivation rec {
2949
3050 buildInputs = [ openssl gnutls gmp libxml2 stoken zlib ]
3151 ++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.PCSC;
32− nativeBuildInputs = [ pkg-config ];
52+ nativeBuildInputs = [ pkg-config ]
53+ ++ lib.optional head autoreconfHook;
3354
3455 meta = with lib; {
3556 description = "VPN Client for Cisco's AnyConnect SSL VPN";
3657 homepage = "http://www.infradead.org/openconnect/";
37− license = licenses.lgpl21;
58+ license = licenses.lgpl21Only;
3859 maintainers = with maintainers; [ pradeepchhetri tricktron ];
3960 platforms = lib.platforms.linux ++ lib.platforms.darwin;
4061 };