diff --git a/pkgs/by-name/ts/tsshd/package.nix b/pkgs/by-name/ts/tsshd/package.nix index ce9d662d7a54..451d1ad9a116 100644 --- a/pkgs/by-name/ts/tsshd/package.nix +++ b/pkgs/by-name/ts/tsshd/package.nix @@ -2,6 +2,7 @@ lib, buildGoModule, fetchFromGitHub, + stdenv, versionCheckHook, nix-update-script, }: @@ -24,6 +25,23 @@ buildGoModule (finalAttrs: { "-w" ]; + # Enable for upstream KCP and QUIC tests which require UDP binding on localhost + __darwinAllowLocalNetworking = true; + + checkFlags = + let + skippedTests = [ + # `quic.DialAddr` of `quic-go` invokes UDP writing with `sendmsg` from address `[::]`, + # causing these tests to fail even with the `__darwinAllowLocalNetworking` flag enabled. + "TestQUIC_InitialPacketSize" + "TestQUIC_RespectMTU" + "TestQUIC_CertValidation" + ]; + in + lib.optionals stdenv.hostPlatform.isDarwin [ + "-skip=^${builtins.concatStringsSep "$|^" skippedTests}$" + ]; + doInstallCheck = true; nativeCheckInputs = [ versionCheckHook