2008-11-27 11:32:47 +01:00
|
|
|
{ stdenv, fetchurl, nettools, libgcrypt, perl, gawk, makeWrapper }:
|
2008-02-10 22:54:01 +01:00
|
|
|
|
2008-11-27 11:32:47 +01:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "vpnc-0.5.3";
|
2008-02-10 22:54:01 +01:00
|
|
|
src = fetchurl {
|
2008-11-27 11:32:47 +01:00
|
|
|
url = "http://www.unix-ag.uni-kl.de/~massar/vpnc/${name}.tar.gz";
|
|
|
|
sha256 = "1128860lis89g1s21hqxvap2nq426c9j4bvgghncc1zj0ays7kj6";
|
2008-02-10 22:54:01 +01:00
|
|
|
};
|
|
|
|
|
2012-02-29 23:50:33 +01:00
|
|
|
patches = [ ./makefile.patch ./vpnc-script.patch ];
|
2008-02-10 22:54:01 +01:00
|
|
|
|
2008-02-21 20:33:21 +01:00
|
|
|
# The `etc/vpnc/vpnc-script' script relies on `which' and on
|
|
|
|
# `ifconfig' as found in net-tools (not GNU Inetutils).
|
2008-11-27 11:32:47 +01:00
|
|
|
propagatedBuildInputs = [ nettools ];
|
2008-02-21 20:33:21 +01:00
|
|
|
|
|
|
|
buildInputs = [libgcrypt perl makeWrapper];
|
|
|
|
|
2008-05-09 10:02:56 +02:00
|
|
|
preConfigure = ''
|
2008-11-27 11:32:47 +01:00
|
|
|
substituteInPlace "vpnc-script.in" \
|
|
|
|
--replace "which" "type -P" \
|
|
|
|
--replace "awk" "${gawk}/bin/awk"
|
|
|
|
|
2008-05-09 10:02:56 +02:00
|
|
|
substituteInPlace "config.c" \
|
|
|
|
--replace "/etc/vpnc/vpnc-script" "$out/etc/vpnc/vpnc-script"
|
|
|
|
|
|
|
|
substituteInPlace "pcf2vpnc" \
|
|
|
|
--replace "/usr/bin/perl" "${perl}/bin/perl"
|
|
|
|
'';
|
2008-02-10 22:54:01 +01:00
|
|
|
|
2008-02-21 20:33:21 +01:00
|
|
|
postInstall = ''
|
2012-02-24 18:32:11 +01:00
|
|
|
for i in "$out/{bin,sbin}/"*
|
2008-02-21 20:33:21 +01:00
|
|
|
do
|
|
|
|
wrapProgram $i --prefix PATH : \
|
2008-11-27 11:32:47 +01:00
|
|
|
"${nettools}/bin:${nettools}/sbin"
|
2008-02-21 20:33:21 +01:00
|
|
|
done
|
2012-02-24 18:32:11 +01:00
|
|
|
|
|
|
|
mkdir -p $out/share/doc/vpnc
|
|
|
|
cp README nortel.txt ChangeLog $out/share/doc/vpnc/
|
2008-02-21 20:33:21 +01:00
|
|
|
'';
|
|
|
|
|
2008-02-10 22:54:01 +01:00
|
|
|
meta = {
|
2012-02-24 18:32:11 +01:00
|
|
|
homepage = "http://www.unix-ag.uni-kl.de/~massar/vpnc/";
|
|
|
|
description = "virtual private network (VPN) client for Cisco's VPN concentrators";
|
2014-06-19 06:19:00 +02:00
|
|
|
license = stdenv.lib.licenses.gpl2Plus;
|
2012-02-24 18:32:11 +01:00
|
|
|
|
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
maintainers = [ stdenv.lib.maintainers.simons ];
|
2008-02-10 22:54:01 +01:00
|
|
|
};
|
|
|
|
}
|