Unverified Commit f3810037 authored by Christian Kögler's avatar Christian Kögler Committed by GitHub
Browse files

tailscale: add lsof dependency on darwin (#375407)

parents 95c58aeb 4b2abf40
Loading
Loading
Loading
Loading
+13 −1
Original line number Diff line number Diff line
@@ -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 : ${