summary refs log tree commit diff
path: root/pkgs/tools/networking/libreswan
diff options
context:
space:
mode:
authorrnhmjoj <rnhmjoj@inventati.org>2022-01-19 11:44:58 +0100
committerrnhmjoj <rnhmjoj@inventati.org>2022-01-19 11:44:58 +0100
commit4db154ca619c8da8655e79faabb38c13ff2ad053 (patch)
treee72fc370043a365f68770ecdc67c8a9bea592643 /pkgs/tools/networking/libreswan
parent741a585052c99be0bf2633c6195be57a464b962e (diff)
downloadnixpkgs-4db154ca619c8da8655e79faabb38c13ff2ad053.tar
nixpkgs-4db154ca619c8da8655e79faabb38c13ff2ad053.tar.gz
nixpkgs-4db154ca619c8da8655e79faabb38c13ff2ad053.tar.bz2
nixpkgs-4db154ca619c8da8655e79faabb38c13ff2ad053.tar.lz
nixpkgs-4db154ca619c8da8655e79faabb38c13ff2ad053.tar.xz
nixpkgs-4db154ca619c8da8655e79faabb38c13ff2ad053.tar.zst
nixpkgs-4db154ca619c8da8655e79faabb38c13ff2ad053.zip
libreswan: fix more binary paths
Diffstat (limited to 'pkgs/tools/networking/libreswan')
-rw-r--r--pkgs/tools/networking/libreswan/default.nix9
1 files changed, 6 insertions, 3 deletions
diff --git a/pkgs/tools/networking/libreswan/default.nix b/pkgs/tools/networking/libreswan/default.nix
index d384fbf680a..6062b1ecfff 100644
--- a/pkgs/tools/networking/libreswan/default.nix
+++ b/pkgs/tools/networking/libreswan/default.nix
@@ -70,11 +70,14 @@ stdenv.mkDerivation rec {
   ] ++ lib.optional stdenv.isLinux libselinux;
 
   prePatch = ''
-    # Correct iproute2 path
-    sed -e 's|"/sbin/ip"|"${iproute2}/bin/ip"|' \
-        -e 's|"/sbin/iptables"|"${iptables}/bin/iptables"|' \
+    # Correct iproute2 and iptables path
+    sed -e 's|/sbin/ip|${iproute2}/bin/ip|' \
+        -e 's|/sbin/\(ip6\?tables\)|${iptables}/bin/\1|' \
         -i initsystems/systemd/ipsec.service.in \
+           programs/barf/barf.in \
            programs/verify/verify.in
+    sed -e 's|\([[:blank:]]\)\(ip6\?tables\(-save\)\? -\)|\1${iptables}/bin/\2|' \
+        -i programs/verify/verify.in
 
     # Prevent the makefile from trying to
     # reload the systemd daemon or create tmpfiles