openconnect: 8.10 -> 8.20, unstable-2021-05-05 -> 2022-03-14, cleanup

This commit is contained in:
alyaeanyx 2022-03-26 15:00:36 +01:00
parent 9c27834e32
commit 687834f44d
No known key found for this signature in database
GPG Key ID: 87D1AADCD25B8DEE
4 changed files with 71 additions and 67 deletions

View File

@ -0,0 +1,43 @@
{ version
, src
}:
{ lib
, stdenv
, pkg-config
, gnutls
, openssl
, useOpenSSL ? false
, gmp
, libxml2
, stoken
, zlib
, vpnc-scripts
, PCSC
, autoreconfHook
}:
stdenv.mkDerivation rec {
pname = "openconnect";
inherit version src;
outputs = [ "out" "dev" ];
configureFlags = [
"--with-vpnc-script=${vpnc-scripts}/bin/vpnc-script"
"--disable-nls"
"--without-openssl-version-check"
];
buildInputs = [ gmp libxml2 stoken zlib (if useOpenSSL then openssl else gnutls) ]
++ lib.optional stdenv.isDarwin PCSC;
nativeBuildInputs = [ pkg-config autoreconfHook ];
meta = with lib; {
description = "VPN Client for Cisco's AnyConnect SSL VPN";
homepage = "https://www.infradead.org/openconnect/";
license = licenses.lgpl21Only;
maintainers = with maintainers; [ pradeepchhetri tricktron alyaeanyx ];
platforms = lib.platforms.unix;
};
}

View File

@ -1,58 +1,31 @@
{ lib
, stdenv
, fetchurl
, pkg-config
, openssl ? null
, gnutls ? null
, p11-kit
, gmp
, libxml2
, stoken
, zlib
, vpnc-scripts
, PCSC
, head ? false
, fetchFromGitLab
, autoreconfHook
}:
{ callPackage, fetchFromGitLab, fetchurl, darwin }:
let
common = opts: callPackage (import ./common.nix opts) {
inherit (darwin.apple_sdk.frameworks) PCSC;
};
in rec {
openconnect = common rec {
version = "8.20";
src = fetchurl {
url = "ftp://ftp.infradead.org/pub/openconnect/openconnect-${version}.tar.gz";
sha256 = "sha256-wUUjhMb3lrruRdTpGa4b/CgdbIiGLh9kaizFE/xE5Ys=";
};
};
assert (openssl != null) == (gnutls == null);
stdenv.mkDerivation rec {
pname = "openconnect${lib.optionalString head "-head"}";
version = if head then "2021-05-05" else "8.10";
src =
if head then fetchFromGitLab {
openconnect_unstable = common {
version = "unstable-2022-03-14";
src = fetchFromGitLab {
owner = "openconnect";
repo = "openconnect";
rev = "684f6db1aef78e61e01f511c728bf658c30b9114";
sha256 = "0waclawcymgd8sq9xbkn2q8mnqp4pd0gpyv5wrnb7i0nsv860wz8";
}
else fetchurl {
url = "ftp://ftp.infradead.org/pub/openconnect/${pname}-${version}.tar.gz";
sha256 = "1cdsx4nsrwawbsisfkldfc9i4qn60g03vxb13nzppr2br9p4rrih";
rev = "a27a46f1362978db9723c8730f2533516b4b31b1";
sha256 = "sha256-Kz98GHCyEcx7vUF+AXMLR7886+iKGKNwx1iRaYcH8ps=";
};
};
outputs = [ "out" "dev" ];
configureFlags = [
"--with-vpnc-script=${vpnc-scripts}/bin/vpnc-script"
"--disable-nls"
"--without-openssl-version-check"
];
buildInputs = [ openssl gnutls gmp libxml2 stoken zlib ]
++ lib.optional stdenv.isDarwin PCSC
++ lib.optional stdenv.isLinux p11-kit;
nativeBuildInputs = [ pkg-config ]
++ lib.optional head autoreconfHook;
meta = with lib; {
description = "VPN Client for Cisco's AnyConnect SSL VPN";
homepage = "https://www.infradead.org/openconnect/";
license = licenses.lgpl21Only;
maintainers = with maintainers; [ pradeepchhetri tricktron ];
platforms = lib.platforms.linux ++ lib.platforms.darwin;
openconnect_openssl = openconnect.override {
useOpenSSL = true;
};
}

View File

@ -833,6 +833,8 @@ mapAliases ({
openbazaar-client = throw "openbazzar-client has been removed from nixpkgs as upstream has abandoned the project"; # Added 2022-01-06
opencascade_oce = throw "'opencascade_oce' has been renamed to/replaced by 'opencascade'"; # Converted to throw 2022-02-22
opencl-icd = throw "'opencl-icd' has been renamed to/replaced by 'ocl-icd'"; # Converted to throw 2022-02-22
openconnect_head = openconnect_unstable; # Added 2022-03-29
openconnect_gnutls = openconnect; # Added 2022-03-29
openconnect_pa = throw "openconnect_pa fork has been discontinued, support for GlobalProtect is now available in openconnect"; # Added 2021-05-21
openelec-dvb-firmware = libreelec-dvb-firmware; # Added 2021-05-10
openexr_ctl = throw "'openexr_ctl' has been renamed to/replaced by 'ctl'"; # Converted to throw 2022-02-22

View File

@ -10993,23 +10993,9 @@ with pkgs;
witness = callPackage ../tools/security/witness { };
openconnect = openconnect_gnutls;
openconnectPackages = callPackage ../tools/networking/openconnect { };
openconnect_openssl = callPackage ../tools/networking/openconnect {
inherit (darwin.apple_sdk.frameworks) PCSC;
gnutls = null;
};
openconnect_gnutls = callPackage ../tools/networking/openconnect {
inherit (darwin.apple_sdk.frameworks) PCSC;
openssl = null;
};
openconnect_head = callPackage ../tools/networking/openconnect {
inherit (darwin.apple_sdk.frameworks) PCSC;
head = true;
openssl = null;
};
inherit (openconnectPackages) openconnect openconnect_unstable openconnect_openssl;
globalprotect-openconnect = libsForQt5.callPackage ../tools/networking/globalprotect-openconnect { };