on iko/ghcjs-patch-master help sign in
Custom args to `cabal new-configure` IFD functions (#305)
26d7b00Hamish Mackenzie
docs/reference/library.md+1
@@ -220,6 +220,7 @@ needed for `importAndFilterProject`.
220| `nix-tools` | | Optional nix-tools to use |
220| `nix-tools` | | Optional nix-tools to use |
221| `hpack` | | Optional hpack to use |
221| `hpack` | | Optional hpack to use |
222| `cabal-install` | | Optional cabal-install to use |
222| `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). |
223
224
224## importAndFilterProject
225## importAndFilterProject
225
226
lib/call-cabal-project-to-nix.nix+3−1
@@ -9,6 +9,7 @@
9, nix-tools ? defaults.nix-tools
9, nix-tools ? defaults.nix-tools
10, hpack ? defaults.hpack
10, hpack ? defaults.hpack
11, cabal-install ? defaults.cabal-install
11, 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)
12, ...
13, ...
13}@args:
14}@args:
14# cabal-install versions before 2.4 will generate insufficient plan information.
15# cabal-install versions before 2.4 will generate insufficient plan information.
@@ -182,7 +183,8 @@ let
182 sha256 = index-sha256-found; }} cabal new-configure \
183 sha256 = index-sha256-found; }} cabal new-configure \
183 --with-ghc=${ghc.targetPrefix}ghc \
184 --with-ghc=${ghc.targetPrefix}ghc \
184 --with-ghc-pkg=${ghc.targetPrefix}ghc-pkg \
185 --with-ghc-pkg=${ghc.targetPrefix}ghc-pkg \
185− --enable-tests
186+ --enable-tests \
187+ ${configureArgs}
186
188
187 mkdir -p $out
189 mkdir -p $out
188
190