From 032f261fae00459598a7aac3c4893c668c9d41cc Mon Sep 17 00:00:00 2001 From: "Berk D. Demir" Date: Sun, 1 May 2022 23:15:08 +0000 Subject: [PATCH] delve: Fix tests on Linux, disable tests on Darwin Bug fixed by #173702 runs the previously skipped tests for this package. --- pkgs/development/tools/delve/default.nix | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/delve/default.nix b/pkgs/development/tools/delve/default.nix index 635a8aa88064..83ac8ad8198f 100644 --- a/pkgs/development/tools/delve/default.nix +++ b/pkgs/development/tools/delve/default.nix @@ -1,4 +1,4 @@ -{ lib, buildGoModule, fetchFromGitHub, makeWrapper }: +{ lib, buildGoModule, fetchFromGitHub, makeWrapper, stdenv }: buildGoModule rec { pname = "delve"; @@ -17,7 +17,19 @@ buildGoModule rec { nativeBuildInputs = [ makeWrapper ]; - checkFlags = [ "-short" ]; + hardeningDisable = [ "fortify" ]; + + preCheck = '' + XDG_CONFIG_HOME=$(mktemp -d) + ''; + + # Disable tests on Darwin as they require various workarounds. + # + # - Tests requiring local networking fail with or without sandbox, + # even with __darwinAllowLocalNetworking allowed. + # - CGO_FLAGS warnings break tests' expected stdout/stderr outputs. + # - DAP test binaries exit prematurely. + doCheck = !stdenv.isDarwin; postInstall = '' # fortify source breaks build since delve compiles with -O0