on iko/ghcjs-patch-master help sign in
Only pass `--index-state` to `cabal` when asked (#1384)
e2b12dbHamish Mackenzie
lib/call-cabal-project-to-nix.nix+6−6
@@ -530,12 +530,12 @@ let
530 index-state = cached-index-state;
530 index-state = cached-index-state;
531 sha256 = index-sha256-found;
531 sha256 = index-sha256-found;
532 }
532 }
533− } cabal v2-freeze \
533+ } cabal v2-freeze ${
534− --index-state=${
535− # Setting the desired `index-state` here in case it was not
534+ # Setting the desired `index-state` here in case it is not
536− # from the cabal.project file. This will further restrict the
535+ # in the cabal.project file. This will further restrict the
537− # packages used by the solver (cached-index-state >= index-state-found).
536+ # packages used by the solver (cached-index-state >= index-state-found).
538− index-state-found} \
537+ pkgs.lib.optionalString (index-state != null) "--index-state=${index-state}"
538+ } \
539 -w ${
539 -w ${
540 # We are using `-w` rather than `--with-ghc` here to override
540 # We are using `-w` rather than `--with-ghc` here to override
541 # the `with-compiler:` in the `cabal.project` file.
541 # the `with-compiler:` in the `cabal.project` file.