lol
at v206 58 lines 1.7 kB view raw
1{ stdenv, fetchsvn, nettools, libgcrypt, openssl, openresolv, perl, gawk, makeWrapper }: 2 3stdenv.mkDerivation rec { 4 name = "vpnc-0.5.3-post-r550"; 5 src = fetchsvn { 6 url = "http://svn.unix-ag.uni-kl.de/vpnc"; 7 rev = "550"; 8 sha256 = "0x4ckfv9lpykwmh28v1kyzz91y1j2v48fi8q5nsawrba4q0wlrls"; 9 }; 10 11 postUnpack = '' 12 mv $sourceRoot/trunk/* $sourceRoot/. 13 rm -r $sourceRoot/{trunk,branches,tags} 14 ''; 15 16 patches = [ ./makefile.patch ./no_default_route_when_netmask.patch ]; 17 18 # The `etc/vpnc/vpnc-script' script relies on `which' and on 19 # `ifconfig' as found in net-tools (not GNU Inetutils). 20 propagatedBuildInputs = [ nettools ]; 21 22 buildInputs = [libgcrypt perl makeWrapper openssl ]; 23 24 preConfigure = '' 25 sed -i 's|^#OPENSSL|OPENSSL|g' Makefile 26 27 substituteInPlace "vpnc-script" \ 28 --replace "which" "type -P" \ 29 --replace "awk" "${gawk}/bin/awk" \ 30 --replace "/sbin/resolvconf" "${openresolv}/bin/resolvconf" 31 32 substituteInPlace "config.c" \ 33 --replace "/etc/vpnc/vpnc-script" "$out/etc/vpnc/vpnc-script" 34 35 substituteInPlace "pcf2vpnc" \ 36 --replace "/usr/bin/perl" "${perl}/bin/perl" 37 ''; 38 39 postInstall = '' 40 for i in "$out/{bin,sbin}/"* 41 do 42 wrapProgram $i --prefix PATH : \ 43 "${nettools}/bin:${nettools}/sbin" 44 done 45 46 mkdir -p $out/share/doc/vpnc 47 cp README nortel.txt ChangeLog $out/share/doc/vpnc/ 48 ''; 49 50 meta = { 51 homepage = "http://www.unix-ag.uni-kl.de/~massar/vpnc/"; 52 description = "virtual private network (VPN) client for Cisco's VPN concentrators"; 53 license = stdenv.lib.licenses.gpl2Plus; 54 55 platforms = stdenv.lib.platforms.linux; 56 maintainers = [ stdenv.lib.maintainers.simons ]; 57 }; 58}