2015-06-11 19:52:00 +02:00
|
|
|
{ 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);
|
2013-05-31 20:19:56 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2015-06-11 19:52:00 +02:00
|
|
|
name = "openconnect-7.06";
|
2013-05-31 20:19:56 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
urls = [
|
|
|
|
"ftp://ftp.infradead.org/pub/openconnect/${name}.tar.gz"
|
|
|
|
];
|
2015-06-11 19:52:00 +02:00
|
|
|
sha256 = "1wkhmgfxkdkhy2p9w9idrgipxmxij2z4f88flfk3fifwd19nkkzs";
|
2013-05-31 20:19:56 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
export PKG_CONFIG=${pkgconfig}/bin/pkg-config
|
2015-10-05 13:23:01 +02:00
|
|
|
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"
|
2013-06-08 12:26:23 +02:00
|
|
|
"--without-openssl-version-check"
|
2013-05-31 20:19:56 +02:00
|
|
|
];
|
|
|
|
|
2015-06-11 19:52:00 +02:00
|
|
|
buildInputs = [ pkgconfig ];
|
|
|
|
propagatedBuildInputs = [ vpnc openssl gnutls libxml2 zlib ];
|
2013-05-31 20:19:56 +02:00
|
|
|
}
|