@@ -8,6 +8,7 @@ trap "rm $tmpfile" 0
88curl -L -s "https://www.stackage.org/lts/cabal.config" >"$tmpfile"
99version=$(sed -n "s/^--.*http:..www.stackage.org.snapshot.lts-//p" "$tmpfile")
1010
11+# Create a simple yaml version of the file.
1112sed -r \
1213 -e '/^--/d' \
1314 -e 's|^constraints:||' \
@@ -16,9 +17,17 @@ sed -r \
1617 -e '/installed$/d' \
1718 -i "$tmpfile"
1819
20+# Drop restrictions on some tools where we always want the latest version.
21+sed -r \
22+ -e '/ cabal2nix /d' \
23+ -e '/ stack /d' \
24+ -i "$tmpfile"
25+
26+# Drop the previous configuration ...
1927sed -e '/# LTS Haskell/,/^$/c \TODO\
2028' -i nixpkgs/pkgs/development/haskell-modules/configuration-hackage2nix.yaml
2129
30+# ... and replace it with the new one.
2231sed -e "/TODO/r $tmpfile" \
2332 -e "s/TODO/ # LTS Haskell $version/" \
2433 -i nixpkgs/pkgs/development/haskell-modules/configuration-hackage2nix.yaml