5tmpfile=$(mktemp "update-stackage.XXXXXXX")
6# shellcheck disable=SC2064
7trap "rm ${tmpfile} ${tmpfile}.new" 0
9curl -L -s "https://stackage.org/lts/cabal.config" >"$tmpfile"
10version=$(sed -rn "s/^--.*http:..(www.)?stackage.org.snapshot.lts-//p" "$tmpfile")
12# Create a simple yaml version of the file.
15 -e 's|^constraints:||' \
20 < "${tmpfile}" | sort --ignore-case >"${tmpfile}.new"
22# Drop restrictions on some tools where we always want the latest version.
24 -e '/ cabal-install /d' \
26 -e '/ distribution-nixpkgs /d' \
33 -e '/ jailbreak-cabal /d' \
34 -e '/ json-autotype/d' \
35 -e '/ lambdabot-core /d' \
36 -e '/ lambdabot-irc-plugins /d' \
37 -e '/ language-nix /d' \
39 -e '/ ShellCheck /d' \
42 < "${tmpfile}.new" > "${tmpfile}"
44# Drop the previous configuration ...
45# shellcheck disable=SC1004
46sed -e '/# LTS Haskell/,/^$/c \TODO\
47' -i nixpkgs/pkgs/development/haskell-modules/configuration-hackage2nix.yaml
49# ... and replace it with the new one.
50sed -e "/TODO/r $tmpfile" \
51 -e "s/TODO/ # LTS Haskell $version/" \
52 -i nixpkgs/pkgs/development/haskell-modules/configuration-hackage2nix.yaml
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list