···11#! /usr/bin/env nix-shell
22#! nix-shell -i bash -p git gh -I nixpkgs=.
33#
44-# Script to merge the currently open haskell-updates PR into master, bump the
55-# Stackage version and Hackage versions, and open the next haskell-updates PR.
44+# Script to merge the currently open haskell-updates PR , bump the Stackage
55+# version and Hackage versions, and open the next haskell-updates PR.
6677set -eu -o pipefail
88···7979echo "Merging https://github.com/NixOS/nixpkgs/pull/${curr_haskell_updates_pr_num}..."
8080gh pr merge --repo NixOS/nixpkgs --merge "$curr_haskell_updates_pr_num"
81818282-# Update the list of Haskell package versions in NixOS on Hackage.
8383-echo "Updating list of Haskell package versions in NixOS on Hackage..."
8484-./maintainers/scripts/haskell/upload-nixos-package-list-to-hackage.sh
8585-8682# Update stackage, Hackage hashes, and regenerate Haskell package set
8783echo "Updating Stackage..."
8884./maintainers/scripts/haskell/update-stackage.sh --do-commit
···10096new_pr_body=$(cat <<EOF
10197### This Merge
10298103103-This PR is the regular merge of the \`haskell-updates\` branch into \`master\`.
9999+This PR is the regular merge of the \`haskell-updates\` branch into \`staging\`.
104100105101This branch is being continually built and tested by hydra at https://hydra.nixos.org/jobset/nixpkgs/haskell-updates. You may be able to find an up-to-date Hydra build report at [cdepillabout/nix-haskell-updates-status](https://github.com/cdepillabout/nix-haskell-updates-status).
106102···113109The short version is this:
114110* We regularly update the Stackage and Hackage pins on \`haskell-updates\` (normally at the beginning of a merge window).
115111* The community fixes builds of Haskell packages on that branch.
116116-* We aim at at least one merge of \`haskell-updates\` into \`master\` every two weeks.
112112+* We aim at at least one merge of \`haskell-updates\` into \`staging\` every two weeks.
117113* We only do the merge if the [\`mergeable\`](https://hydra.nixos.org/job/nixpkgs/haskell-updates/mergeable) job is succeeding on hydra.
118114* If a [\`maintained\`](https://hydra.nixos.org/job/nixpkgs/haskell-updates/maintained) package is still broken at the time of merge, we will only merge if the maintainer has been pinged 7 days in advance. (If you care about a Haskell package, become a maintainer!)
119115···126122)
127123128124echo "Opening a PR for the next haskell-updates merge cycle..."
129129-gh pr create --repo NixOS/nixpkgs --base master --head haskell-updates --title "haskellPackages: update stackage and hackage" --body "$new_pr_body"
125125+gh pr create --repo NixOS/nixpkgs --base staging --head haskell-updates --title "haskellPackages: update stackage and hackage" --body "$new_pr_body"