wireguard-tools: use resolvconf from PATH if available

Allows using wg-quick with systemd-resolved which provides its own
implementation of the resolvconf command.

Changed files
+4 -1
pkgs
tools
networking
wireguard-tools
+4 -1
pkgs/tools/networking/wireguard-tools/default.nix
···
--replace /usr/bin $out/bin
'' + lib.optionalString stdenv.isLinux ''
for f in $out/bin/*; do
-
wrapProgram $f --prefix PATH : ${lib.makeBinPath [ procps iproute2 iptables openresolv ]}
done
'';
···
--replace /usr/bin $out/bin
'' + lib.optionalString stdenv.isLinux ''
for f in $out/bin/*; do
+
# allow users to provide their own resolvconf implementation, e.g. the one provided by systemd-resolved
+
wrapProgram $f \
+
--prefix PATH : ${lib.makeBinPath [ procps iproute2 iptables ]} \
+
--suffix PATH : ${lib.makeBinPath [ openresolv ]}
done
'';