on 4ecc0aa help sign in
haskell.nix/scripts/update-hackage.nix
25 lines 606 B history raw
1{ stdenv, writeScript, coreutils, glibc, git, openssh, nix-tools, cabal-install, nix-prefetch-git }@args:
3import ./update-external.nix args {
4 name = "hackage";
5 script = ''
6 # Clone or update the Hackage Nix expressions repo.
7 if [ -d hackage.nix ]; then
8 cd hackage.nix
9 git pull --ff-only
10 cd ..
11 else
12 git clone git@github.com:input-output-hk/hackage.nix.git
13 fi
15 # Make sure the hackage index is recent.
16 echo "Updating local hackage index..."
17 cabal update
19 echo "Running hackage-to-nix..."
21 hackage-to-nix hackage.nix
23 cd hackage.nix
24 '';