summary refs log tree commit diff
path: root/pkgs/development/haskell-modules
diff options
context:
space:
mode:
authorsternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org>2021-06-19 21:49:14 +0200
committersterni <sternenseemann@systemli.org>2021-06-22 00:18:12 +0200
commit0917e2ae279c5974f1a5028a48d2e8a808e0e7bb (patch)
tree6f912a534a50bed2abc1c0d08ffdf481a8951f64 /pkgs/development/haskell-modules
parentc0b69bcbb9fb1e2dee1181d9087e28a756875526 (diff)
downloadnixpkgs-0917e2ae279c5974f1a5028a48d2e8a808e0e7bb.tar
nixpkgs-0917e2ae279c5974f1a5028a48d2e8a808e0e7bb.tar.gz
nixpkgs-0917e2ae279c5974f1a5028a48d2e8a808e0e7bb.tar.bz2
nixpkgs-0917e2ae279c5974f1a5028a48d2e8a808e0e7bb.tar.lz
nixpkgs-0917e2ae279c5974f1a5028a48d2e8a808e0e7bb.tar.xz
nixpkgs-0917e2ae279c5974f1a5028a48d2e8a808e0e7bb.tar.zst
nixpkgs-0917e2ae279c5974f1a5028a48d2e8a808e0e7bb.zip
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!).
Diffstat (limited to 'pkgs/development/haskell-modules')
-rw-r--r--pkgs/development/haskell-modules/configuration-common.nix6
1 files changed, 5 insertions, 1 deletions
diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix
index 8fe82094d54..2c32d81cf35 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