@@ -1,4 +1,4 @@
1−{ stdenv, fetchzip, libmnl ? null, makeWrapper ? null, wireguard-go ? null }:
1+{ stdenv, fetchzip, openresolv ? null, libmnl ? null, procps ? null, iproute ? null, makeWrapper ? null, wireguard-go ? null }:
22
33with stdenv.lib;
44
@@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
1313
1414 sourceRoot = "source/src/tools";
1515
16− nativeBuildInputs = optional stdenv.isDarwin makeWrapper;
16+ nativeBuildInputs = [ makeWrapper ];
1717 buildInputs = optional stdenv.isLinux libmnl;
1818
1919 makeFlags = [
@@ -27,6 +27,10 @@ stdenv.mkDerivation rec {
2727 postFixup = ''
2828 substituteInPlace $out/lib/systemd/system/wg-quick@.service \
2929 --replace /usr/bin $out/bin
30+ '' + optionalString stdenv.isLinux ''
31+ for f in $out/bin/*; do
32+ wrapProgram $f --prefix PATH : ${makeBinPath [procps iproute openresolv]}
33+ done
3034 '' + optionalString stdenv.isDarwin ''
3135 for f in $out/bin/*; do
3236 wrapProgram $f --prefix PATH : ${wireguard-go}/bin