@@ -1,4 +1,4 @@
1−{ dotCabal, pkgs, runCommand, nix-tools, cabal-install, ghc, hpack, symlinkJoin }:
1+{ dotCabal, pkgs, runCommand, nix-tools, cabal-install, ghc, hpack, symlinkJoin, cacert }:
2let defaultGhc = ghc;
2let defaultGhc = ghc;
3 defaultCabalInstall = cabal-install;
3 defaultCabalInstall = cabal-install;
4in { index-state, index-sha256 ? (import ./index-state-hashes.nix).${index-state} or null, src, ghc ? defaultGhc, cabal-install ? defaultCabalInstall }:
4in { index-state, index-sha256 ? (import ./index-state-hashes.nix).${index-state} or null, src, ghc ? defaultGhc, cabal-install ? defaultCabalInstall }:
@@ -29,6 +29,8 @@ let
29 # without the source available (we cleaneSourceWith'd it),
29 # without the source available (we cleaneSourceWith'd it),
30 # this may not produce the right result.
30 # this may not produce the right result.
31 find . -name package.yaml -exec hpack "{}" \;
31 find . -name package.yaml -exec hpack "{}" \;
32+ export SSL_CERT_FILE=${cacert}/etc/ssl/certs/ca-bundle.crt
33+ export GIT_SSL_CAINFO=${cacert}/etc/ssl/certs/ca-bundle.crt
32 HOME=${dotCabal { inherit index-state; sha256 = index-sha256; }} cabal new-configure
34 HOME=${dotCabal { inherit index-state; sha256 = index-sha256; }} cabal new-configure
34 export LANG=C.utf8 # Needed or stack-to-nix will die on unicode inputs
36 export LANG=C.utf8 # Needed or stack-to-nix will die on unicode inputs