diff --git a/ci/TestPatches.hs b/ci/TestPatches.hs
index 03b36cbc55e8b43aaaf7d07ed8fc694a6f8b9580..70e263440944390ee508ce532ea3f64e7e4bdb82 100644
--- a/ci/TestPatches.hs
+++ b/ci/TestPatches.hs
@@ -254,9 +254,10 @@ buildPackage cfg pname version = do
     (makeTestCabalFile cfg pname version)
 
   -- run the build
+  absDirName <- makeAbsolute "./store"
   code <- runProcess $ setWorkingDir dirName
                      $ proc "cabal"
-                     $ ["v2-build"] ++ cabalOptions cfg
+                     $ ["--store-dir="++absDirName, "v2-build"] ++ cabalOptions cfg
 
   -- figure out what happened
   let planPath = dirName </> "dist-newstyle" </> "cache" </> "plan.json"