diff options
author | Domen Kožar <domen@dev.si> | 2014-09-03 22:31:26 +0200 |
---|---|---|
committer | Domen Kožar <domen@dev.si> | 2014-09-03 22:31:26 +0200 |
commit | 1568dcd4dcbb02759c1320f863c6b1a979ceee90 (patch) | |
tree | 7090495eb753f276fb9e2e0998bd231d597492c9 /pkgs/applications/networking/ike | |
parent | 2e97c06999db2a5dd56b3e105d8f57ad2013ff51 (diff) |
move ike to applications/networking folder
Diffstat (limited to 'pkgs/applications/networking/ike')
-rw-r--r-- | pkgs/applications/networking/ike/default.nix | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/pkgs/applications/networking/ike/default.nix b/pkgs/applications/networking/ike/default.nix new file mode 100644 index 0000000000000..48f277ad4c98d --- /dev/null +++ b/pkgs/applications/networking/ike/default.nix @@ -0,0 +1,47 @@ +{ stdenv, fetchurl, cmake, openssl, libedit, flex, bison, qt4, makeWrapper +, gcc, nettools, iproute, linuxHeaders }: + +assert stdenv.isLinux; + +# NOTE: use $out/etc/iked.conf as sample configuration and also set: dhcp_file "/etc/iked.dhcp"; +# launch with "iked -f /etc/iked.conf" + +# 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 + +stdenv.mkDerivation rec { + name = "ike-2.2.1"; + + src = fetchurl { + url = "https://www.shrew.net/download/ike/${name}-release.tgz"; + sha256 = "0fhyr2psd93b0zf7yfb72q3nqnh65mymgq5jpjcsj9jv5kfr6l8y"; + }; + + buildInputs = [ cmake openssl libedit flex bison qt4 makeWrapper nettools iproute ]; + + configurePhase = '' + mkdir -p $out/{bin,sbin,lib} + 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 + ''; + + buildPhase = '' + make + ''; + + installPhase = '' + make install + for file in "$out"/bin/* "$out"/sbin/*; do + wrapProgram $file --prefix LD_LIBRARY_PATH ":" "$out/lib:${openssl}/lib:${gcc.gcc}/lib:${stdenv.glibc}/lib::${gcc.gcc}/lib64:${stdenv.glibc}/lib64:${libedit}/lib:${qt4}/lib" + 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 ]; + license = licenses.sleepycat; + }; +} |