2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchsvn, nettools, libgcrypt, openssl, openresolv, perl, gawk, makeWrapper }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2021-08-05 21:33:18 +00:00
|
|
|
pname = "vpnc";
|
|
|
|
version = "0.5.3-post-r550";
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchsvn {
|
|
|
|
url = "https://svn.unix-ag.uni-kl.de/vpnc";
|
|
|
|
rev = "550";
|
|
|
|
sha256 = "0x4ckfv9lpykwmh28v1kyzz91y1j2v48fi8q5nsawrba4q0wlrls";
|
|
|
|
};
|
|
|
|
|
|
|
|
postUnpack = ''
|
|
|
|
mv $sourceRoot/trunk/* $sourceRoot/.
|
|
|
|
rm -r $sourceRoot/{trunk,branches,tags}
|
|
|
|
'';
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
patches = [ ./no_default_route_when_netmask.patch ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# The `etc/vpnc/vpnc-script' script relies on `which' and on
|
|
|
|
# `ifconfig' as found in net-tools (not GNU Inetutils).
|
|
|
|
propagatedBuildInputs = [ nettools ];
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildInputs = [libgcrypt perl openssl ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
makeFlags = [
|
|
|
|
"PREFIX=$(out)"
|
|
|
|
"ETCDIR=$(out)/etc/vpnc"
|
|
|
|
"SCRIPT_PATH=$(out)/etc/vpnc/vpnc-script"
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
patchShebangs makeman.pl
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
preConfigure = ''
|
|
|
|
sed -i 's|^#OPENSSL|OPENSSL|g' Makefile
|
|
|
|
|
|
|
|
substituteInPlace "vpnc-script" \
|
|
|
|
--replace "which" "type -P" \
|
|
|
|
--replace "awk" "${gawk}/bin/awk" \
|
|
|
|
--replace "/sbin/resolvconf" "${openresolv}/bin/resolvconf"
|
|
|
|
|
|
|
|
substituteInPlace "config.c" \
|
|
|
|
--replace "/etc/vpnc/vpnc-script" "$out/etc/vpnc/vpnc-script"
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
for i in "$out/{bin,sbin}/"*
|
|
|
|
do
|
|
|
|
wrapProgram $i --prefix PATH : \
|
|
|
|
"${nettools}/bin:${nettools}/sbin"
|
|
|
|
done
|
|
|
|
|
|
|
|
mkdir -p $out/share/doc/vpnc
|
|
|
|
cp README nortel.txt ChangeLog $out/share/doc/vpnc/
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "https://www.unix-ag.uni-kl.de/~massar/vpnc/";
|
|
|
|
description = "Virtual private network (VPN) client for Cisco's VPN concentrators";
|
2021-01-15 22:18:51 +00:00
|
|
|
license = lib.licenses.gpl2Plus;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
platforms = lib.platforms.linux;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|