summary refs log blame commit diff
path: root/pkgs/tools/networking/vpnc/default.nix
blob: dcce3bba5dff008adf3379df5bb2b7812c2c3972 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
                









                                                                                





                                                              






                                                                   
 







                                                       
          
                                                                
                                                    
                                                          
                       

    
args: with args;

stdenv.mkDerivation {
  name = "vpnc-0.5.1";
  src = fetchurl {
    url = http://www.unix-ag.uni-kl.de/~massar/vpnc/vpnc-0.5.1.tar.gz;
    sha256 = "f63660bd020bbe6a39e8eb67ad60c54d719046c6198a6834371d098947f9a2ed";
  };

  patches = [ ./makefile.patch ];

  # The `etc/vpnc/vpnc-script' script relies on `which' and on
  # `ifconfig' as found in net-tools (not GNU Inetutils).
  propagatedBuildInputs = [which nettools];

  buildInputs = [libgcrypt perl makeWrapper];

  preConfigure = ''
    substituteInPlace "config.c" \
      --replace "/etc/vpnc/vpnc-script" "$out/etc/vpnc/vpnc-script"

    substituteInPlace "pcf2vpnc" \
      --replace "/usr/bin/perl" "${perl}/bin/perl"
  '';

  postInstall = ''
    for i in $out/{bin,sbin}/*
    do
      wrapProgram $i --prefix PATH :  \
        "${which}/bin:${nettools}/bin:${nettools}/sbin"
    done
  '';

  meta = {
    description = ''VPNC, a virtual private network (VPN) client
                    for Cisco's VPN concentrators'';
    homepage = http://www.unix-ag.uni-kl.de/~massar/vpnc/;
    license = "GPLv2+";
  };
}