nixpkgs/pkgs/tools/networking/openconnect/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

59 lines
1.5 KiB
Nix
Raw Normal View History

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