2013-12-30 17:17:17 +00:00
|
|
|
{ stdenv, fetchurl, cmake, openssl, libedit, flex, bison, qt4, makeWrapper
|
|
|
|
, gcc, nettools, iproute, linuxHeaders }:
|
2013-10-18 17:50:21 +01:00
|
|
|
|
2014-08-22 10:57:40 +01:00
|
|
|
assert stdenv.isLinux;
|
|
|
|
|
2013-10-18 17:50:21 +01:00
|
|
|
# NOTE: use $out/etc/iked.conf as sample configuration and also set: dhcp_file "/etc/iked.dhcp";
|
|
|
|
# launch with "iked -f /etc/iked.conf"
|
|
|
|
|
2013-12-30 17:17:17 +00:00
|
|
|
# NOTE: my testings reveal that kernels 3.11.10 and 3.12.6 won't let the traffic through the tunnel,
|
|
|
|
# so I'm sticking with 3.4
|
|
|
|
|
2013-10-18 17:50:21 +01:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "ike-2.2.1";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://www.shrew.net/download/ike/${name}-release.tgz";
|
|
|
|
sha256 = "0fhyr2psd93b0zf7yfb72q3nqnh65mymgq5jpjcsj9jv5kfr6l8y";
|
|
|
|
};
|
|
|
|
|
2013-12-30 17:17:17 +00:00
|
|
|
buildInputs = [ cmake openssl libedit flex bison qt4 makeWrapper nettools iproute ];
|
2013-10-18 17:50:21 +01:00
|
|
|
|
|
|
|
configurePhase = ''
|
|
|
|
mkdir -p $out/{bin,sbin,lib}
|
2013-12-30 17:17:17 +00:00
|
|
|
cmake -DQTGUI=YES -DETCDIR=$out/etc -DLIBDIR=$out/lib -DSBINDIR=$out/sbin -DBINDIR=$out/bin \
|
|
|
|
-DKRNINC="${linuxHeaders}/include/" -DTESTS=YES \
|
|
|
|
-DMANDIR=$out/man -DNATT=YES -DCMAKE_INSTALL_PREFIX:BOOL=$out
|
2013-10-18 17:50:21 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
make
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
make install
|
|
|
|
for file in "$out"/bin/* "$out"/sbin/*; do
|
2015-01-15 04:44:00 +00:00
|
|
|
wrapProgram $file --prefix LD_LIBRARY_PATH ":" "$out/lib:${openssl}/lib:${gcc.cc}/lib:${stdenv.glibc}/lib::${gcc.cc}/lib64:${stdenv.glibc}/lib64:${libedit}/lib:${qt4}/lib"
|
2013-10-18 17:50:21 +01:00
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = https://www.shrew.net/software;
|
|
|
|
description = "IPsec Client for FreeBSD, NetBSD and many Linux based operating systems";
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = [ maintainers.iElectric ];
|
2014-03-25 00:58:36 +00:00
|
|
|
license = licenses.sleepycat;
|
2013-10-18 17:50:21 +01:00
|
|
|
};
|
|
|
|
}
|