Skip to content

Commit efbd1a1

Browse files
committed
It seems to work a bit
1 parent de47723 commit efbd1a1

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

lib/call-cabal-project-to-nix.nix

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ let
463463
${builtins.concatStringsSep "\n" (pkgs.lib.mapAttrsToList f inputMap)}
464464
'';
465465
};
466-
f = name: index: "http://${name}\tfile://${index}";
466+
f = name: index: "${name}\tfile://${index}";
467467
in
468468
evalPackages.writeShellApplication {
469469
name = "curl";
@@ -567,22 +567,21 @@ let
567567
export SSL_CERT_FILE=${cacert}/etc/ssl/certs/ca-bundle.crt
568568
export GIT_SSL_CAINFO=${cacert}/etc/ssl/certs/ca-bundle.crt
569569
570-
export HOME=$(mktemp -d)
570+
export CABAL_DIR=$(mktemp -d)
571571
572-
mkdir $HOME/.cabal
573-
cat >$HOME/.cabal/config <<EOF
572+
cat >$CABAL_DIR/config <<EOF
574573
repository hackage.haskell.org
575574
url: http://hackage.haskell.org/
576575
secure: True
577-
root-keys: aaa -- DO NOT ASK ME
576+
root-keys: aaa
578577
key-threshold: 0
579578
EOF
580-
cat $HOME/.cabal/config
579+
cat $CABAL_DIR/config
581580
582581
PATH=${
583-
fakeCurl {
584-
"hackage.haskell.org" = hackageRepo { index-state = cached-index-state; sha256 = index-sha256-found; };
585-
}
582+
fakeCurl ({
583+
"http://hackage.haskell.org" = hackageRepo { index-state = cached-index-state; sha256 = index-sha256-found; };
584+
} // inputMap)
586585
}/bin:$PATH \
587586
cabal update -v \
588587
-w ${ghc.targetPrefix}ghc \

0 commit comments

Comments
 (0)