From 5052fe194d9b4e99f8a90e3b408a64299e357dee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Fri, 9 May 2008 08:02:56 +0000 Subject: [PATCH] vpnc: Fix `pcf2vpnc'. svn path=/nixpkgs/trunk/; revision=11791 --- pkgs/tools/networking/vpnc/builder.sh | 9 --------- pkgs/tools/networking/vpnc/default.nix | 12 +++++++++--- 2 files changed, 9 insertions(+), 12 deletions(-) delete mode 100644 pkgs/tools/networking/vpnc/builder.sh diff --git a/pkgs/tools/networking/vpnc/builder.sh b/pkgs/tools/networking/vpnc/builder.sh deleted file mode 100644 index ecfabe2eb5e6..000000000000 --- a/pkgs/tools/networking/vpnc/builder.sh +++ /dev/null @@ -1,9 +0,0 @@ -source "$stdenv/setup" - -tar zxvf "$src" && -cd vpnc-*.* - -cat config.c | \ -sed "s|/etc/vpnc/vpnc-script|$out/etc/vpnc/vpnc-script|g" > ,,tmp && \ -mv ,,tmp config.c && \ -patchPhase && buildPhase && installPhase && fixupPhase && distPhase diff --git a/pkgs/tools/networking/vpnc/default.nix b/pkgs/tools/networking/vpnc/default.nix index 87e979330aeb..dcce3bba5dff 100644 --- a/pkgs/tools/networking/vpnc/default.nix +++ b/pkgs/tools/networking/vpnc/default.nix @@ -15,7 +15,13 @@ stdenv.mkDerivation { buildInputs = [libgcrypt perl makeWrapper]; - builder = ./builder.sh; + 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}/* @@ -27,8 +33,8 @@ stdenv.mkDerivation { meta = { description = ''VPNC, a virtual private network (VPN) client - for Cisco's VPN concentrators.''; + for Cisco's VPN concentrators''; homepage = http://www.unix-ag.uni-kl.de/~massar/vpnc/; - license = "GPL"; + license = "GPLv2+"; }; }