diff --git a/Makefile b/Makefile
index 6d8394aa64e8f6b79b30d1f46f0747577d2cc0fa..56747e4b9f5e291303647d54bda721683c51d5a3 100644
--- a/Makefile
+++ b/Makefile
@@ -81,8 +81,8 @@ ghcid-cli :
 #       https://github.com/haskell/cabal/issues/8734
 #       Just as well, cabal-install(-solver) doctests (the target below) bitrotted and need some care.
 doctest :
-	cabal repl --with-ghc=doctest --build-depends=QuickCheck --build-depends=template-haskell --repl-options="-w" --project-file="cabal.project.validate" Cabal-syntax
-	cabal repl --with-ghc=doctest --build-depends=QuickCheck --build-depends=template-haskell --repl-options="-w" --project-file="cabal.project.validate" Cabal
+	cabal repl --with-ghc=doctest --build-depends=QuickCheck --build-depends=template-haskell --repl-options="-w" --project-file="cabal.project.doctest" Cabal-syntax
+	cabal repl --with-ghc=doctest --build-depends=QuickCheck --build-depends=template-haskell --repl-options="-w" --project-file="cabal.project.doctest" Cabal
 
 
 # This is not run as part of validate.sh (we need hackage-security, which is tricky to get).
diff --git a/cabal.project.doctest b/cabal.project.doctest
new file mode 100644
index 0000000000000000000000000000000000000000..dac9b0d88a9cf4300a8eb54151d6ca91b621aad3
--- /dev/null
+++ b/cabal.project.doctest
@@ -0,0 +1,24 @@
+packages: Cabal-syntax/
+packages: Cabal/
+packages: cabal-testsuite/
+packages: cabal-install/
+packages: solver-benchmarks/
+
+packages: cabal-install-solver/
+packages: Cabal-QuickCheck/
+packages: Cabal-tree-diff
+packages: Cabal-described
+packages: Cabal-tests
+packages: cabal-benchmarks
+
+tests: True
+
+-- avoiding extra dependencies
+constraints: rere -rere-cfg
+constraints: these -assoc
+
+write-ghc-environment-files: never
+
+program-options
+  ghc-options: -fno-ignore-asserts
+