From 1103974a279c14d3a60de98700fba2d2918f3256 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Thu, 11 Nov 2021 12:23:12 +0000 Subject: [PATCH 1/2] Revert "unbound: don't run tests when cross compiling" This reverts commit 28e5327e96bca1f62f9b78963220d5019a74fffe. This change didn't have any effect, because stdenv.mkDerivation will ignore the doCheck argument when cross-compiling. The reason tests are being run when cross-compiling is because of the manual checkPhase invocation in postFixup. --- pkgs/tools/networking/unbound/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/tools/networking/unbound/default.nix b/pkgs/tools/networking/unbound/default.nix index 5238f13d6984..26401f229c25 100644 --- a/pkgs/tools/networking/unbound/default.nix +++ b/pkgs/tools/networking/unbound/default.nix @@ -95,7 +95,7 @@ stdenv.mkDerivation rec { checkInputs = [ bison ]; - doCheck = stdenv.buildPlatform == stdenv.hostPlatform; + doCheck = true; installFlags = [ "configfile=\${out}/etc/unbound/unbound.conf" ]; From e07e70151513ddc90ec178f681e471ee5cf67890 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Thu, 11 Nov 2021 12:26:21 +0000 Subject: [PATCH 2/2] unbound: don't run tests when cross-compiling stdenv.mkDerivation will automatically set doCheck to false when cross-compiling (which is why the default checkPhase doesn't happen). --- pkgs/tools/networking/unbound/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/networking/unbound/default.nix b/pkgs/tools/networking/unbound/default.nix index 26401f229c25..98b7b2547d69 100644 --- a/pkgs/tools/networking/unbound/default.nix +++ b/pkgs/tools/networking/unbound/default.nix @@ -113,7 +113,9 @@ stdenv.mkDerivation rec { configureFlags="$configureFlags --with-nettle=${nettle.dev} --with-libunbound-only" configurePhase buildPhase - checkPhase + if [ -n "$doCheck" ]; then + checkPhase + fi installPhase '' # get rid of runtime dependencies on $dev outputs