openconnect: update to version 7.06 and support openssl or gnutls

This commit is contained in:
John Chee 2015-06-11 10:52:00 -07:00
parent 7a0ca52267
commit 85da7792b8
2 changed files with 21 additions and 5 deletions

View File

@ -1,13 +1,19 @@
{ stdenv, fetchurl, pkgconfig, vpnc, openssl, libxml2, zlib } :
{ stdenv, fetchurl, pkgconfig, vpnc, openssl ? null, gnutls ? null, libxml2, zlib } :
let
xor = a: b: (a || b) && (!(a && b));
in
assert xor (openssl != null) (gnutls != null);
stdenv.mkDerivation rec {
name = "openconnect-5.02";
name = "openconnect-7.06";
src = fetchurl {
urls = [
"ftp://ftp.infradead.org/pub/openconnect/${name}.tar.gz"
];
sha256 = "1y7dn42gd3763sgwv2j72xy9hsikd6y9x142g84kwdbn0y0psgi4";
sha256 = "1wkhmgfxkdkhy2p9w9idrgipxmxij2z4f88flfk3fifwd19nkkzs";
};
preConfigure = ''
@ -22,5 +28,6 @@ stdenv.mkDerivation rec {
"--without-openssl-version-check"
];
propagatedBuildInputs = [ vpnc openssl libxml2 zlib ];
buildInputs = [ pkgconfig ];
propagatedBuildInputs = [ vpnc openssl gnutls libxml2 zlib ];
}

View File

@ -3144,7 +3144,16 @@ let
vpnc = callPackage ../tools/networking/vpnc { };
openconnect = callPackage ../tools/networking/openconnect.nix { };
openconnect = openconnect_openssl;
openconnect_openssl = callPackage ../tools/networking/openconnect.nix {
gnutls = null;
};
openconnect_gnutls = lowPrio (openconnect.override {
openssl = null;
gnutls = gnutls;
});
vtun = callPackage ../tools/networking/vtun { };