Files
haskell.nix/scripts/update-stackage.nix
T
Hamish Mackenzie d5d304d5b5 Flakify all inputs (#1180)
* Include dependencies of haskell.nix that were tracked in `nix/sources.json`
  as flake inputs (`flake.lock` replaces `nix/sources.json`).
* Use `flake-compat` to continue to provide a compatible interface for non
  flake projects.

Co-authored-by: Alexander Bantyev <balsoft@balsoft.ru>
Co-authored-by: Shea Levy <shea@shealevy.com>
2021-08-06 15:54:39 +12:00

28 lines
823 B
Nix

{ stdenv, lib, writeScript, coreutils, glibc, git, openssh
, nix-tools, cabal-install, nixFlakes
, gawk, bash, curl, findutils }@args:
import ./update-external.nix args {
name = "stackage";
script = ''
# Clone or update the main Stackage Nix expressions repo.
# The upstream LTS and Nightly package sets are in submodules, which
# should also be updated.
if [ -d stackage.nix ]; then
cd stackage.nix
git pull --ff-only
git submodule update --init
git submodule foreach git pull origin master
else
git clone git@github.com:input-output-hk/stackage.nix.git
cd stackage.nix
git submodule update --init
git submodule foreach git pull origin master
fi
echo "Running lts-to-nix for all snapshots..."
LTS_TO_NIX=lts-to-nix ./update.sh
'';
}