summary refs log tree commit diff
path: root/maintainers/scripts
diff options
context:
space:
mode:
authorMalte Brandy <malte.brandy@maralorn.de>2021-06-19 14:18:17 +0200
committerMalte Brandy <malte.brandy@maralorn.de>2021-06-19 14:18:17 +0200
commitbf3a3b62e4a98d3b721ff222d7a457e3c013aaf5 (patch)
treea7571a74211355ae38f11827a4eef0e3016b0287 /maintainers/scripts
parent1070b786a9c55650f1e062f8729437d66c8c2ce0 (diff)
downloadnixpkgs-bf3a3b62e4a98d3b721ff222d7a457e3c013aaf5.tar
nixpkgs-bf3a3b62e4a98d3b721ff222d7a457e3c013aaf5.tar.gz
nixpkgs-bf3a3b62e4a98d3b721ff222d7a457e3c013aaf5.tar.bz2
nixpkgs-bf3a3b62e4a98d3b721ff222d7a457e3c013aaf5.tar.lz
nixpkgs-bf3a3b62e4a98d3b721ff222d7a457e3c013aaf5.tar.xz
nixpkgs-bf3a3b62e4a98d3b721ff222d7a457e3c013aaf5.tar.zst
nixpkgs-bf3a3b62e4a98d3b721ff222d7a457e3c013aaf5.zip
haskellPackages: switch from stackage-nightly to stackage-lts 18.0
Diffstat (limited to 'maintainers/scripts')
-rwxr-xr-xmaintainers/scripts/haskell/update-stackage.sh25
1 files changed, 7 insertions, 18 deletions
diff --git a/maintainers/scripts/haskell/update-stackage.sh b/maintainers/scripts/haskell/update-stackage.sh
index 7a0e1e1f81a..ecf38dc4b90 100755
--- a/maintainers/scripts/haskell/update-stackage.sh
+++ b/maintainers/scripts/haskell/update-stackage.sh
@@ -11,15 +11,17 @@ stackage_config="pkgs/development/haskell-modules/configuration-hackage2nix/stac
 trap "rm ${tmpfile} ${tmpfile}.new" 0
 touch "$tmpfile" "$tmpfile.new" # Creating files here so that trap creates no errors.
 
-curl -L -s "https://stackage.org/nightly/cabal.config" >"$tmpfile"
-old_version=$(grep "# Stackage Nightly" $stackage_config | sed -E 's/.*([0-9]{4}-[0-9]{2}-[0-9]{2}).*/\1/')
-version=$(sed -rn "s/^--.*http:..(www.)?stackage.org.snapshot.nightly-//p" "$tmpfile")
+curl -L -s "https://stackage.org/lts/cabal.config" >"$tmpfile"
+old_version=$(grep "# Stackage" $stackage_config | sed -E 's/.*([0-9]{2}\.[0-9]+)/\1/')
+version=$(sed -rn "s/^--.*http:..(www.)?stackage.org.snapshot.lts-//p" "$tmpfile")
 
 if [[ "$old_version" == "$version" ]]; then
    echo "No new stackage version"
    exit 0 # Nothing to do
 fi
 
+echo "Updating Stackage LTS from $old_version to $version."
+
 # Create a simple yaml version of the file.
 sed -r \
     -e '/^--/d' \
@@ -31,7 +33,7 @@ sed -r \
     < "${tmpfile}" | sort --ignore-case >"${tmpfile}.new"
 
 cat > $stackage_config << EOF
-# Stackage Nightly $version
+# Stackage LTS $version
 # This file is auto-generated by
 # maintainers/scripts/haskell/update-stackage.sh
 default-package-overrides:
@@ -39,29 +41,16 @@ EOF
 
 # Drop restrictions on some tools where we always want the latest version.
 sed -r \
-    -e '/ cabal-install /d' \
     -e '/ cabal2nix /d' \
-    -e '/ cabal2spec /d' \
     -e '/ distribution-nixpkgs /d' \
-    -e '/ git-annex /d' \
-    -e '/ hindent /d' \
-    -e '/ hledger/d' \
-    -e '/ hlint /d' \
-    -e '/ hoogle /d' \
-    -e '/ hopenssl /d' \
     -e '/ jailbreak-cabal /d' \
-    -e '/ json-autotype/d' \
     -e '/ language-nix /d' \
-    -e '/ shake /d' \
-    -e '/ ShellCheck /d' \
-    -e '/ stack /d' \
-    -e '/ weeder /d' \
     < "${tmpfile}.new" >> $stackage_config
 
 if [[ "${1:-}" == "--do-commit" ]]; then
 git add $stackage_config
 git commit -F - << EOF
-haskellPackages: stackage-nightly $old_version -> $version
+haskellPackages: stackage-lts $old_version -> $version
 
 This commit has been generated by maintainers/scripts/haskell/update-stackage.sh
 EOF