wireguard-tools: bake wireguard-go in PATH

It’s a dependency. Without this, wg-quick doesn’t work if it’s installed on a
system without wireguard-go available in the PATH of the user.
This commit is contained in:
Hraban Luyat 2023-08-28 01:45:42 -04:00 committed by Weijia Wang
parent c66ccfa00c
commit 012978daf9

View File

@ -8,6 +8,7 @@
, openresolv
, procps
, bash
, wireguard-go
}:
stdenv.mkDerivation rec {
@ -46,6 +47,11 @@ stdenv.mkDerivation rec {
--prefix PATH : ${lib.makeBinPath [ procps iproute2 ]} \
--suffix PATH : ${lib.makeBinPath [ iptables openresolv ]}
done
'' + lib.optionalString stdenv.isDarwin ''
for f in $out/bin/*; do
wrapProgram $f \
--prefix PATH : ${lib.makeBinPath [ wireguard-go ]}
done
'';
passthru = {