From f5f1bfa30a37784222fac84c422f595273f8ef5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Domen=20Ko=C5=BEar?= Date: Fri, 18 Oct 2013 18:50:21 +0200 Subject: [PATCH] add ike: IPSec client --- pkgs/applications/ike/default.nix | 39 +++++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 41 insertions(+) create mode 100644 pkgs/applications/ike/default.nix diff --git a/pkgs/applications/ike/default.nix b/pkgs/applications/ike/default.nix new file mode 100644 index 000000000000..52330b57b8fa --- /dev/null +++ b/pkgs/applications/ike/default.nix @@ -0,0 +1,39 @@ +{ stdenv, fetchurl, cmake, openssl, libedit, flex, bison, qt4, makeWrapper, gcc }: + +# NOTE: use $out/etc/iked.conf as sample configuration and also set: dhcp_file "/etc/iked.dhcp"; +# launch with "iked -f /etc/iked.conf" + +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 ]; + + configurePhase = '' + mkdir -p $out/{bin,sbin,lib} + cmake -DQTGUI=YES -DETCDIR=$out/etc -DLIBDIR=$out/lib -DSBINDIR=$out/sbin -DBINDIR=$out/bin -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:${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 = "sleepycat"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e43fdd4243d2..c0f7cb59d5e2 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8029,6 +8029,8 @@ let ii = callPackage ../applications/networking/irc/ii { }; + ike = callPackage ../applications/ike { }; + ikiwiki = callPackage ../applications/misc/ikiwiki { inherit (perlPackages) TextMarkdown URI HTMLParser HTMLScrubber HTMLTemplate TimeDate CGISession DBFile CGIFormBuilder LocaleGettext