tailscale: add lsof dependency on darwin (#375407)

This commit is contained in:
Christian Kögler 2025-02-16 14:35:32 +01:00 committed by GitHub
commit f381003797
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -8,6 +8,7 @@
getent,
iproute2,
iptables,
lsof,
shadow,
procps,
nixosTests,
@ -45,7 +46,8 @@ buildGo123Module {
vendorHash = "sha256-81UOjoC5GJqhNs4vWcQ2/B9FMaDWtl0rbuFXmxbu5dI=";
nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ makeWrapper ] ++ [
nativeBuildInputs = [
makeWrapper
installShellFiles
];
@ -77,6 +79,16 @@ buildGo123Module {
moveToOutput "bin/derper" "$derper"
moveToOutput "bin/derpprobe" "$derper"
''
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
wrapProgram $out/bin/tailscaled \
--prefix PATH : ${
lib.makeBinPath [
# Uses lsof only on macOS to detect socket location
# See tailscale safesocket_darwin.go
lsof
]
}
''
+ lib.optionalString stdenv.hostPlatform.isLinux ''
wrapProgram $out/bin/tailscaled \
--prefix PATH : ${