diff --git a/pkgs/tools/networking/vpnc/default.nix b/pkgs/tools/networking/vpnc/default.nix index 6928bacd6ce7..121cfef3f580 100644 --- a/pkgs/tools/networking/vpnc/default.nix +++ b/pkgs/tools/networking/vpnc/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation { rm -r $sourceRoot/{trunk,branches,tags} ''; - patches = [ ./makefile.patch ./no_default_route_when_netmask.patch ]; + patches = [ ./no_default_route_when_netmask.patch ]; # The `etc/vpnc/vpnc-script' script relies on `which' and on # `ifconfig' as found in net-tools (not GNU Inetutils). @@ -23,6 +23,16 @@ stdenv.mkDerivation { nativeBuildInputs = [ makeWrapper ]; buildInputs = [libgcrypt perl openssl ]; + makeFlags = [ + "PREFIX=$(out)" + "ETCDIR=$(out)/etc/vpnc" + "SCRIPT_PATH=$(out)/etc/vpnc/vpnc-script" + ]; + + postPatch = '' + patchShebangs makeman.pl + ''; + preConfigure = '' sed -i 's|^#OPENSSL|OPENSSL|g' Makefile diff --git a/pkgs/tools/networking/vpnc/makefile.patch b/pkgs/tools/networking/vpnc/makefile.patch deleted file mode 100644 index 89a8cd6da952..000000000000 --- a/pkgs/tools/networking/vpnc/makefile.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- vpnc-0.5.1.orig/Makefile 2008-02-10 22:22:43.000000000 +0100 -+++ vpnc-0.5.1/Makefile 2008-02-10 22:22:32.000000000 +0100 -@@ -20,8 +20,8 @@ - # $Id: Makefile 236 2007-09-05 20:40:59Z Joerg Mayer $ - - DESTDIR= --PREFIX=/usr/local --ETCDIR=/etc/vpnc -+PREFIX=$(out) -+ETCDIR=$(out)/etc/vpnc - BINDIR=$(PREFIX)/bin - SBINDIR=$(PREFIX)/sbin - MANDIR=$(PREFIX)/share/man -@@ -71,7 +71,7 @@ - $(CC) -o $@ $^ $(LDFLAGS) - - vpnc.8 : vpnc.8.template makeman.pl vpnc -- ./makeman.pl -+ perl makeman.pl - - cisco-decrypt : cisco-decrypt.o config.o supp.o sysdep.o vpnc-debug.o - $(CC) -o $@ $^ $(LDFLAGS)