diff options
author | Michele Guerini Rocco <rnhmjoj@users.noreply.github.com> | 2021-05-25 11:23:02 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-25 11:23:02 +0200 |
commit | 1ab8b02359093d1cbd6c2993149f635ee9015589 (patch) | |
tree | 892de949a26aeeaaef309b7511dbf9a72d142cff /pkgs/tools/networking | |
parent | 528a33727ff3db9712e79b21b6d120afb0e4221a (diff) | |
parent | 61f556a60b2aa171fd90c8edc0f7857df4492512 (diff) | |
download | nixlib-1ab8b02359093d1cbd6c2993149f635ee9015589.tar nixlib-1ab8b02359093d1cbd6c2993149f635ee9015589.tar.gz nixlib-1ab8b02359093d1cbd6c2993149f635ee9015589.tar.bz2 nixlib-1ab8b02359093d1cbd6c2993149f635ee9015589.tar.lz nixlib-1ab8b02359093d1cbd6c2993149f635ee9015589.tar.xz nixlib-1ab8b02359093d1cbd6c2993149f635ee9015589.tar.zst nixlib-1ab8b02359093d1cbd6c2993149f635ee9015589.zip |
Merge pull request #122617 from rnhmjoj/openconnect
openconnect-head: init at 2021-05-05
Diffstat (limited to 'pkgs/tools/networking')
-rw-r--r-- | pkgs/tools/networking/openconnect/default.nix | 45 |
1 files changed, 33 insertions, 12 deletions
diff --git a/pkgs/tools/networking/openconnect/default.nix b/pkgs/tools/networking/openconnect/default.nix index da4dab4980c0..8afe546c4593 100644 --- a/pkgs/tools/networking/openconnect/default.nix +++ b/pkgs/tools/networking/openconnect/default.nix @@ -1,4 +1,19 @@ -{ lib, stdenv, fetchurl, pkg-config, openssl ? null, gnutls ? null, gmp, libxml2, stoken, zlib, fetchgit, darwin } : +{ lib +, stdenv +, fetchurl +, pkg-config +, openssl ? null +, gnutls ? null +, gmp +, libxml2 +, stoken +, zlib +, fetchgit +, darwin +, head ? false + , fetchFromGitLab + , autoreconfHook +}: assert (openssl != null) == (gnutls == null); @@ -9,15 +24,20 @@ let vpnc = fetchgit { }; in stdenv.mkDerivation rec { - pname = "openconnect"; - version = "8.10"; - - src = fetchurl { - urls = [ - "ftp://ftp.infradead.org/pub/openconnect/${pname}-${version}.tar.gz" - ]; - sha256 = "1cdsx4nsrwawbsisfkldfc9i4qn60g03vxb13nzppr2br9p4rrih"; - }; + 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"; + }; outputs = [ "out" "dev" ]; @@ -29,12 +49,13 @@ in stdenv.mkDerivation rec { buildInputs = [ openssl gnutls gmp libxml2 stoken zlib ] ++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.PCSC; - nativeBuildInputs = [ pkg-config ]; + nativeBuildInputs = [ pkg-config ] + ++ lib.optional head autoreconfHook; meta = with lib; { description = "VPN Client for Cisco's AnyConnect SSL VPN"; homepage = "http://www.infradead.org/openconnect/"; - license = licenses.lgpl21; + license = licenses.lgpl21Only; maintainers = with maintainers; [ pradeepchhetri tricktron ]; platforms = lib.platforms.linux ++ lib.platforms.darwin; }; |