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