From d3276e3021196b184ab3d232552b4b0a4094c94e Mon Sep 17 00:00:00 2001
From: Andreas Klebinger <klebinger.andreas@gmx.at>
Date: Fri, 18 Oct 2024 18:08:00 +0200
Subject: [PATCH] Explicitly depend on base package

---
 shake/runner/Main.hs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/shake/runner/Main.hs b/shake/runner/Main.hs
index 52b3395f..ddb80926 100644
--- a/shake/runner/Main.hs
+++ b/shake/runner/Main.hs
@@ -242,7 +242,7 @@ buildRules nofib@Build{..} = do
     -- .stamp file per build directory.
     buildDepsStamp %> \out -> do
         configs <- mapM (getTestConfig nofib) tests
-        let deps = nub $ foldMap (\config -> words $ config "SRC_DEPS") configs
+        let deps = nub $ ["base"] ++ foldMap (\config -> words $ config "SRC_DEPS") configs
         -- TODO: Invoking cabal in the way we do without any package argument fails.
         root <- liftIO $ IO.makeAbsolute buildDepsRoot
         unless (null deps) $ withResource pkgDbResource 1 $
@@ -611,7 +611,7 @@ getTestCompileArgs nofib test = do
     config <- getTestConfig nofib test
     return $ defaultNoFibHcOpts
          ++ words (config "SRC_HC_OPTS")
-         ++ [ "-package-env", "-" ]
+         ++ [ "-package-env", "-", "-package", "base"]
          ++ concat [ ["-package", pkg] | pkg <- words (config "SRC_DEPS") ]
 
 getModeArgs :: (String -> String) -> Speed -> [String]
-- 
GitLab