haskell: small improvements to script for merging haskell-updates PR

main
(cdep)illabout 3 years ago
parent 5ecf510833
commit 64511038ff
No known key found for this signature in database
GPG Key ID: 462E0C03D11422F4
  1. 5
      maintainers/scripts/haskell/merge-and-open-pr.sh
  2. 1
      maintainers/scripts/haskell/upload-nixos-package-list-to-hackage.sh
  3. 18
      pkgs/development/haskell-modules/HACKING.md

@ -76,6 +76,7 @@ echo "Merging https://github.com/NixOS/nixpkgs/pull/${curr_haskell_updates_pr_nu
gh pr merge --repo NixOS/nixpkgs --merge "$curr_haskell_updates_pr_num"
# Update the list of Haskell package versions in NixOS on Hackage.
echo "Updating list of Haskell package versions in NixOS on Hackage..."
./maintainers/scripts/haskell/upload-nixos-package-list-to-hackage.sh
# Update stackage, Hackage hashes, and regenerate Haskell package set
@ -87,7 +88,7 @@ echo "Regenerating Hackage packages..."
./maintainers/scripts/haskell/regenerate-hackage-packages.sh --do-commit
# Push these new commits to the haskell-updates branch
echo "Pushing commits just created to the haskell-updates branch"
echo "Pushing commits just created to the remote haskell-updates branch..."
git push
# Open new PR
@ -117,5 +118,5 @@ This is the follow-up to #${curr_haskell_updates_pr_num}. Come to [#haskell:nixo
EOF
)
echo "Opening a PR for the next haskell-updates merge cycle"
echo "Opening a PR for the next haskell-updates merge cycle..."
gh pr create --repo NixOS/nixpkgs --base master --head haskell-updates --title "haskellPackages: update stackage and hackage" --body "$new_pr_body"

@ -19,3 +19,4 @@ package_list="$(nix-build -A haskell.package-list)/nixos-hackage-packages.csv"
username=$(grep "^username:" ~/.cabal/config | sed "s/^username: //")
password_command=$(grep "^password-command:" ~/.cabal/config | sed "s/^password-command: //")
curl -u "$username:$($password_command | head -n1)" --digest -H "Content-type: text/csv" -T "$package_list" http://hackage.haskell.org/distro/NixOS/packages.csv
echo

@ -206,10 +206,18 @@ opening the next one. When you want to merge the currently open
script uses the `gh` command to merge the current PR and open a new one.
You should only need to do this once.
This command can be used to authenticate:
```console
$ gh auth login
```
This command can be used to confirm that you have already authenticated:
```console
$ gh auth status
```
1. Make sure you have setup your `~/.cabal/config` file for authentication
for uploading the NixOS package versions to Hackage. See the following
section for details on how to do this.
@ -217,6 +225,14 @@ opening the next one. When you want to merge the currently open
1. Make sure you have correctly marked packages broken. One of the previous
sections explains how to do this.
In short:
```console
$ ./maintainers/scripts/haskell/hydra-report.hs get-report
$ ./maintainers/scripts/haskell/hydra-report.hs mark-broken-list
$ ./maintainers/scripts/haskell/mark-broken.sh --do-commit
```
1. Merge `master` into `haskell-updates` and make sure to push to the
`haskell-updates` branch. (This can be skipped if `master` has recently
been merged into `haskell-updates`.)
@ -242,6 +258,8 @@ opening the next one. When you want to merge the currently open
1. Merges the currently open `haskell-updates` PR.
1. Updates the version of Haskell packages in NixOS on Hackage.
1. Updates Stackage and Hackage snapshots. Regenerates the Haskell package set.
1. Pushes the commits updating Stackage and Hackage and opens a new

Loading…
Cancel
Save