7tmpfile=$(mktemp "update-stackage.XXXXXXX")
8# shellcheck disable=SC2064
9trap "rm ${tmpfile} ${tmpfile}.new" 0
11curl -L -s "https://stackage.org/lts/cabal.config" >"$tmpfile"
12version=$(sed -rn "s/^--.*http:..(www.)?stackage.org.snapshot.lts-//p" "$tmpfile")
14# Create a simple yaml version of the file.
17 -e 's|^constraints:||' \
22 < "${tmpfile}" | sort --ignore-case >"${tmpfile}.new"
24# Drop restrictions on some tools where we always want the latest version.
26 -e '/ cabal-install /d' \
28 -e '/ cabal2spec /d' \
29 -e '/ distribution-nixpkgs /d' \
36 -e '/ jailbreak-cabal /d' \
37 -e '/ json-autotype/d' \
38 -e '/ language-nix /d' \
40 -e '/ ShellCheck /d' \
43 < "${tmpfile}.new" > "${tmpfile}"
45# Drop the previous configuration ...
46# shellcheck disable=SC1004
47sed -e '/ # LTS Haskell/,/^$/c \TODO\
48' -i nixpkgs/pkgs/development/haskell-modules/configuration-hackage2nix.yaml
50# ... and replace it with the new one.
51sed -e "/TODO/r $tmpfile" \
52 -e "s/TODO/ # LTS Haskell $version/" \
53 -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