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

42 lines
1.1 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, pkgconfig, vpnc, openssl ? null, gnutls ? null, gmp, libxml2, stoken, zlib } :
let
xor = a: b: (a || b) && (!(a && b));
in
assert xor (openssl != null) (gnutls != null);
2013-05-31 20:19:56 +02:00
stdenv.mkDerivation rec {
2017-01-28 22:05:37 +01:00
name = "openconnect-7.08";
2013-05-31 20:19:56 +02:00
src = fetchurl {
urls = [
"ftp://ftp.infradead.org/pub/openconnect/${name}.tar.gz"
];
2017-01-28 22:05:37 +01:00
sha256 = "00wacb79l2c45f94gxs63b9z25wlciarasvjrb8jb8566wgyqi0w";
2013-05-31 20:19:56 +02:00
};
preConfigure = ''
export PKG_CONFIG=${pkgconfig}/bin/pkg-config
export LIBXML2_CFLAGS="-I ${libxml2.dev}/include/libxml2"
export LIBXML2_LIBS="-L${libxml2.out}/lib -lxml2"
2013-05-31 20:19:56 +02:00
'';
configureFlags = [
"--with-vpnc-script=${vpnc}/etc/vpnc/vpnc-script"
"--disable-nls"
"--without-openssl-version-check"
2013-05-31 20:19:56 +02:00
];
buildInputs = [ pkgconfig ];
propagatedBuildInputs = [ vpnc openssl gnutls gmp libxml2 stoken zlib ];
meta = {
2017-01-28 22:05:37 +01:00
description = "VPN Client for Cisco's AnyConnect SSL VPN";
homepage = http://www.infradead.org/openconnect/;
license = stdenv.lib.licenses.lgpl21;
maintainers = with stdenv.lib.maintainers; [ pradeepchhetri ];
platforms = stdenv.lib.platforms.linux;
};
2013-05-31 20:19:56 +02:00
}