From 0917e2ae279c5974f1a5028a48d2e8a808e0e7bb Mon Sep 17 00:00:00 2001 From: sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> Date: Sat, 19 Jun 2021 21:49:14 +0200 Subject: [PATCH] haskellPackages.tasty-discover: run test suite in native case For native compilation, we can just add the intermediary build directory to `PATH` which allows the test suite to be preprocessed by tasty-discover itself. When cross-compiling, `doCheck` will be false anyways and this won't matter (fingers crossed!). --- pkgs/development/haskell-modules/configuration-common.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index 8fe82094d54e..2c32d81cf357 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -478,7 +478,11 @@ self: super: { doctest-discover = dontCheck super.doctest-discover; # Depends on itself for testing - tasty-discover = dontCheck super.tasty-discover; + tasty-discover = overrideCabal super.tasty-discover (drv: { + preBuild = '' + export PATH="$PWD/dist/build/tasty-discover:$PATH" + '' + (drv.preBuild or ""); + }); # Known issue with nondeterministic test suite failure # https://github.com/nomeata/tasty-expected-failure/issues/21