2021-01-15 10:19:50 +01:00
|
|
|
{ lib, stdenv, fetchsvn, nettools, libgcrypt, openssl, openresolv, perl, gawk, makeWrapper }:
|
2008-02-10 22:54:01 +01:00
|
|
|
|
2019-08-13 23:52:01 +02:00
|
|
|
stdenv.mkDerivation {
|
2021-08-01 20:11:18 +02:00
|
|
|
pname = "vpnc";
|
|
|
|
version = "0.5.3-post-r550";
|
2015-08-05 21:00:05 +02:00
|
|
|
src = fetchsvn {
|
2018-03-07 22:36:00 +01:00
|
|
|
url = "https://svn.unix-ag.uni-kl.de/vpnc";
|
2015-08-05 21:00:05 +02:00
|
|
|
rev = "550";
|
|
|
|
sha256 = "0x4ckfv9lpykwmh28v1kyzz91y1j2v48fi8q5nsawrba4q0wlrls";
|
2008-02-10 22:54:01 +01:00
|
|
|
};
|
|
|
|
|
2015-08-05 21:00:05 +02:00
|
|
|
postUnpack = ''
|
|
|
|
mv $sourceRoot/trunk/* $sourceRoot/.
|
|
|
|
rm -r $sourceRoot/{trunk,branches,tags}
|
|
|
|
'';
|
|
|
|
|
2015-09-06 19:20:54 +02:00
|
|
|
patches = [ ./makefile.patch ./no_default_route_when_netmask.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
|
|
|
|
2021-02-07 10:17:39 +01:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildInputs = [libgcrypt perl openssl ];
|
2008-02-21 20:33:21 +01:00
|
|
|
|
2008-05-09 10:02:56 +02:00
|
|
|
preConfigure = ''
|
2015-08-05 21:00:05 +02:00
|
|
|
sed -i 's|^#OPENSSL|OPENSSL|g' Makefile
|
|
|
|
|
|
|
|
substituteInPlace "vpnc-script" \
|
2008-11-27 11:32:47 +01:00
|
|
|
--replace "which" "type -P" \
|
2015-08-05 21:00:05 +02:00
|
|
|
--replace "awk" "${gawk}/bin/awk" \
|
|
|
|
--replace "/sbin/resolvconf" "${openresolv}/bin/resolvconf"
|
2008-11-27 11:32:47 +01:00
|
|
|
|
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 = {
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://www.unix-ag.uni-kl.de/~massar/vpnc/";
|
2016-06-20 12:53:46 +02:00
|
|
|
description = "Virtual private network (VPN) client for Cisco's VPN concentrators";
|
2021-01-15 10:19:50 +01:00
|
|
|
license = lib.licenses.gpl2Plus;
|
2012-02-24 18:32:11 +01:00
|
|
|
|
2021-01-15 10:19:50 +01:00
|
|
|
platforms = lib.platforms.linux;
|
2008-02-10 22:54:01 +01:00
|
|
|
};
|
|
|
|
}
|