2015-08-03 16:59:33 +02:00
|
|
|
{ stdenv, fetchurl, gmp, pkgconfig, python, autoreconfHook
|
2015-08-04 19:16:27 +02:00
|
|
|
, curl, trousers, sqlite, iptables, libxml2
|
2015-08-03 16:59:33 +02:00
|
|
|
, enableTNC ? false }:
|
2014-09-16 20:10:37 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2015-06-14 21:44:18 +02:00
|
|
|
name = "strongswan-5.3.2";
|
2014-09-16 20:10:37 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://download.strongswan.org/${name}.tar.bz2";
|
2015-06-14 21:44:18 +02:00
|
|
|
sha256 = "09gjrd5f8iykh926y35blxlm2hlzpw15m847d8vc9ga29s6brad4";
|
2014-09-16 20:10:37 +02:00
|
|
|
};
|
|
|
|
|
2014-11-25 02:50:17 +01:00
|
|
|
dontPatchELF = true;
|
|
|
|
|
2015-08-03 16:59:33 +02:00
|
|
|
buildInputs =
|
2015-08-04 19:16:27 +02:00
|
|
|
[ gmp pkgconfig python autoreconfHook iptables ]
|
|
|
|
++ stdenv.lib.optionals enableTNC [ curl trousers sqlite libxml2 ];
|
2014-12-22 18:24:19 +01:00
|
|
|
|
|
|
|
patches = [
|
2014-12-22 20:55:01 +01:00
|
|
|
./ext_auth-path.patch
|
2014-12-22 18:24:19 +01:00
|
|
|
./firewall_defaults.patch
|
2014-12-22 20:55:01 +01:00
|
|
|
./updown-path.patch
|
2014-12-22 18:24:19 +01:00
|
|
|
];
|
2014-09-19 07:09:00 +02:00
|
|
|
|
2015-08-03 16:59:33 +02:00
|
|
|
configureFlags =
|
2015-08-04 19:16:27 +02:00
|
|
|
[ "--enable-swanctl" "--enable-cmd"
|
|
|
|
"--enable-farp" "--enable-dhcp"
|
|
|
|
"--enable-eap-sim" "--enable-eap-sim-file" "--enable-eap-simaka-pseudonym"
|
|
|
|
"--enable-eap-simaka-reauth" "--enable-eap-identity" "--enable-eap-md5"
|
|
|
|
"--enable-eap-gtc" "--enable-eap-aka" "--enable-eap-aka-3gpp2"
|
|
|
|
"--enable-eap-mschapv2" "--enable-xauth-eap" "--enable-ext-auth"
|
|
|
|
"--enable-forecast" "--enable-connmark" "--enable-acert"
|
|
|
|
"--enable-aesni" "--enable-af-alg" "--enable-rdrand" ]
|
|
|
|
++ stdenv.lib.optional (stdenv.system == "i686-linux") "--enable-padlock"
|
2015-08-03 16:59:33 +02:00
|
|
|
++ stdenv.lib.optionals enableTNC [
|
|
|
|
"--disable-gmp" "--disable-aes" "--disable-md5" "--disable-sha1" "--disable-sha2" "--disable-fips-prf"
|
2015-08-04 19:16:27 +02:00
|
|
|
"--enable-curl" "--enable-openssl"
|
2015-08-03 16:59:33 +02:00
|
|
|
"--enable-eap-tnc" "--enable-eap-ttls" "--enable-eap-dynamic" "--enable-tnccs-20"
|
|
|
|
"--enable-tnc-imc" "--enable-imc-os" "--enable-imc-attestation"
|
|
|
|
"--enable-tnc-imv" "--enable-imv-attestation"
|
2015-08-04 19:16:27 +02:00
|
|
|
"--enable-tnc-ifmap" "--enable-tnc-imc" "--enable-tnc-imv"
|
2015-08-03 16:59:33 +02:00
|
|
|
"--with-tss=trousers"
|
|
|
|
"--enable-aikgen"
|
|
|
|
"--enable-sqlite" ];
|
2014-09-16 20:10:37 +02:00
|
|
|
|
2014-11-11 07:40:52 +01:00
|
|
|
NIX_LDFLAGS = "-lgcc_s" ;
|
|
|
|
|
2014-09-16 20:10:37 +02:00
|
|
|
meta = {
|
|
|
|
description = "OpenSource IPsec-based VPN Solution";
|
|
|
|
homepage = https://www.strongswan.org;
|
|
|
|
license = stdenv.lib.licenses.gpl2Plus;
|
2014-11-26 21:04:59 +01:00
|
|
|
platforms = stdenv.lib.platforms.all;
|
2014-09-16 20:10:37 +02:00
|
|
|
};
|
|
|
|
}
|