Skip to content

Commit efb9a07

Browse files
authored
Enable benchmarks by default when calculating plan (#432)
1 parent 122bd81 commit efb9a07

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

lib/call-cabal-project-to-nix.nix

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@
1111
, nix-tools ? defaults.nix-tools
1212
, hpack ? defaults.hpack
1313
, cabal-install ? defaults.cabal-install
14-
, configureArgs ? "" # Extra arguments to pass to `cabal new-configure` (--enable-tests is included by default, include `--disable-tests` to override that)
14+
, configureArgs ? "" # Extra arguments to pass to `cabal v2-configure`.
15+
# `--enable-tests --enable-benchmarks` are included by default.
16+
# If the tests and benchmarks are not needed and they
17+
# causes the wrong plan to be choosen, then we can use
18+
# `configureArgs = "--disable-tests --disable-benchmarks";`
1519
, ...
1620
}@args:
1721
# cabal-install versions before 2.4 will generate insufficient plan information.
@@ -201,10 +205,11 @@ let
201205
index-state =
202206
builtins.trace ("Using index-state: ${index-state-found}" + (if name == null then "" else " for " + name))
203207
index-state-found;
204-
sha256 = index-sha256-found; }} cabal new-configure \
208+
sha256 = index-sha256-found; }} cabal v2-configure \
205209
--with-ghc=${ghc.targetPrefix}ghc \
206210
--with-ghc-pkg=${ghc.targetPrefix}ghc-pkg \
207211
--enable-tests \
212+
--enable-benchmarks \
208213
${configureArgs}
209214
210215
mkdir -p $out

0 commit comments

Comments
 (0)