on iko/ghcjs-patch-master help sign in
Enable benchmarks by default when calculating plan (#432)
commitefb9a07d64986c8c56d8e4e5cd5f226fd4d243c2 authorHamish Mackenzie <Hamish.Mackenzie@iohk.io> dateTue 4 Feb 2020, 20:20 (7 years ago) parent122bd81
1 file changed+7−2
lib/call-cabal-project-to-nix.nix+7−2
lib/call-cabal-project-to-nix.nix+7−2
@@ -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