Skip to content

Commit f714e81

Browse files
committed
Use cabal update as it works with older versions
1 parent 2122423 commit f714e81

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/hackageIndex.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ let
55
# To avoid downloading more data than necessary this will provide a base.
66
cachedState = runCommand "hackage-${builtins.substring 0 4 indexState}" {} ''
77
mkdir -p $out
8-
HOME=$out ${cabal-install}/bin/cabal new-update 'hackage.haskell.org,${builtins.substring 0 4 indexState}-01-01T00:00:00Z'
8+
HOME=$out ${cabal-install}/bin/cabal update --index-state='${builtins.substring 0 4 indexState}-01-01T00:00:00Z'
99
'';
1010
in runCommand "hackage-${builtins.replaceStrings [":"] [""] indexState}" {} ''
1111
mkdir -p $out
1212
cp -r ${cachedState}/.cabal $out
1313
chmod +w -R $out/.cabal
1414
sed -i.back -e "s|${cachedState}|$out|g" $out/.cabal/config
15-
HOME=$out ${cabal-install}/bin/cabal new-update 'hackage.haskell.org,${indexState}'
15+
HOME=$out ${cabal-install}/bin/cabal update --index-state='${indexState}'
1616
''

0 commit comments

Comments
 (0)