Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cabal2nix: Support testFlags argument #647

Merged
merged 2 commits into from
Feb 14, 2025
Merged

Conversation

sternenseemann
Copy link
Member

@sternenseemann
Copy link
Member Author

Result (compared to master):

diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix
index 503a37fe3a30..52bf3d668f4a 100644
--- a/pkgs/development/haskell-modules/hackage-packages.nix
+++ b/pkgs/development/haskell-modules/hackage-packages.nix
@@ -157039,7 +157039,7 @@ self: {
          wai wai-logger warp warp-tls zlib
        ];
        executableHaskellDepends = [ base ];
-       testTargets = [ "--test-option=--no-net" ];
+       testFlags = [ "--no-net" ];
        description = "Haskell API Search";
        license = lib.licenses.bsd3;
        mainProgram = "hoogle";
@@ -163560,7 +163560,10 @@ self: {
          transformers
        ];
        testToolDepends = [ hspec-meta ];
-       testTargets = [ "--test-option=--skip" "--test-option='Test.Hspec.Core.Runner.hspecResult runs specs in parallel'" ];
+       testFlags = [
+         "--skip"
+         "'Test.Hspec.Core.Runner.hspecResult runs specs in parallel'"
+       ];
        description = "A Testing Framework for Haskell";
        license = lib.licenses.mit;
        hydraPlatforms = lib.platforms.none;
@@ -163589,7 +163592,10 @@ self: {
          temporary tf-random time transformers
        ];
        testToolDepends = [ hspec-meta ];
-       testTargets = [ "--test-option=--skip" "--test-option='Test.Hspec.Core.Runner.hspecResult runs specs in parallel'" ];
+       testFlags = [
+         "--skip"
+         "'Test.Hspec.Core.Runner.hspecResult runs specs in parallel'"
+       ];
        description = "A Testing Framework for Haskell";
        license = lib.licenses.mit;
      }) {};

testFlags was introduced in NixOS/nixpkgs#126364
and has been available since NixOS 21.11.

Future work is removing these PostProcessing rules altogether,
see #504.
@sternenseemann
Copy link
Member Author

Added changelog.

@sternenseemann sternenseemann merged commit a9c686c into master Feb 14, 2025
7 checks passed
@sternenseemann sternenseemann deleted the cabal2nix-test-flags branch February 14, 2025 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants