From 6422b851ec94c3865849684f39e0e873cbc3db53 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Mon, 30 Jun 2025 13:31:53 +0200 Subject: [PATCH] haskellPackages.cabal-cargs: remove dependence on location of source --- .../haskell-modules/configuration-common.nix | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index 22342d8b16b6..7a0a512c7913 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -176,6 +176,29 @@ with haskellLib; guardian ; + # Expected test output for these accidentally checks the absolute location of the source directory + # https://github.com/dan-t/cabal-cargs/issues/9 + cabal-cargs = overrideCabal (drv: { + testFlags = drv.testFlags or [ ] ++ [ + "-p" + "!/FindCabalFilePure withoutSandbox/" + "-p" + "!/FromCabalFilePure withoutSandbox/" + "-p" + "!/FromLibSrcPure withoutSandbox/" + "-p" + "!/FromExeSrcFilePure withoutSandbox/" + "-p" + "!/FindCabalFilePure withSandbox/" + "-p" + "!/FromCabalFilePure withSandbox/" + "-p" + "!/FromLibSrcPure withSandbox/" + "-p" + "!/FromExeSrcFilePure withSandbox/" + ]; + }) super.cabal-cargs; + # Extensions wants the latest version of Cabal for its list of Haskell # language extensions. # 2025-02-10: jailbreak to allow hspec-hedgehog 0.3.0.0 and hedgehog 1.5