on iko/ghcjs-patch-master help sign in
Custom args to `cabal new-configure` IFD functions (#305)
commit26d7b00f1d849c24012d2fa1bc151371cdc89c4e authorHamish Mackenzie <Hamish.Mackenzie@iohk.io> dateFri 8 Nov 2019, 17:53 (7 years ago) parent707c7b8
2 files changed+4−1
docs/reference/library.md+1 lib/call-cabal-project-to-nix.nix+3−1
docs/reference/library.md+1
@@ -220,6 +220,7 @@ needed for `importAndFilterProject`.
220220| `nix-tools` | | Optional nix-tools to use |
221221| `hpack` | | Optional hpack to use |
222222| `cabal-install` | | Optional cabal-install to use |
223+| `configureArgs` | String | Optional extra arguments to pass to `cabal new-configure` (--enable-tests is included by default, include `--disable-tests` to override that). |
223224
224225## importAndFilterProject
225226
lib/call-cabal-project-to-nix.nix+3−1
@@ -9,6 +9,7 @@
99, nix-tools ? defaults.nix-tools
1010, hpack ? defaults.hpack
1111, cabal-install ? defaults.cabal-install
12+, configureArgs ? "" # Extra arguments to pass to `cabal new-configure` (--enable-tests is included by default, include `--disable-tests` to override that)
1213, ...
1314}@args:
1415# cabal-install versions before 2.4 will generate insufficient plan information.
@@ -182,7 +183,8 @@ let
182183 sha256 = index-sha256-found; }} cabal new-configure \
183184 --with-ghc=${ghc.targetPrefix}ghc \
184185 --with-ghc-pkg=${ghc.targetPrefix}ghc-pkg \
185− --enable-tests
186+ --enable-tests \
187+ ${configureArgs}
186188
187189 mkdir -p $out
188190