file will be updated. This is a list of Haskell packages that
depend on a package in `configuration-hackage2nix/broken.yaml` or
`configuration-hackage2nix/transitive-broken.yaml`
- `hackage-packages.nix` will be regenerated again. This will set
`hydraPlatforms = none` for all the packages in
`configuration-hackage2nix/transitive-broken.yaml`. This makes
sure that Hydra does not try to build any of these packages.
- All updated files will be committed.
## Merge `haskell-updates` into `staging`
Now it is time to merge the `haskell-updates` PR you opened above.
Before doing this, make sure of the following:
- All Haskell packages that fail to build are correctly marked broken or
transitively broken.
- The `maintained` and `mergeable` jobs are passing on Hydra.
- The maintainers for any maintained Haskell packages that are newly broken
have been pinged on GitHub and given at least a week to fix their packages.
This is especially important for widely-used packages like `cachix`.
- Keep an eye on the next `staging-next` iteration (which is branched off
from `staging`) to confirm that there are no show stopping issues stemming
from interactions between changes on `staging` and `haskell-updates`.
Also be aware that build or eval regressions from a `haskell-updates`
iteration may only become apparent on `staging-next`, especially when the
`haskell-updates` jobset had e.g. Darwin builds disabled.
## Script for Merging `haskell-updates` and Opening a New PR
There is a script that automates merging the current `haskell-updates` PR and
opening the next one. When you want to merge the currently open
`haskell-updates` PR, you can run the script with the following steps:
1. Make sure you have previously authenticated with the `gh` command. The
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.
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. Go to https://hydra.nixos.org/jobset/nixpkgs/haskell-updates and force an
evaluation of the `haskell-updates` jobset. See one of the following
sections for how to do this. Make sure there are no evaluation errors. If
there are remaining evaluation errors, fix them before continuing with this
merge.
1. Run the script to merge `haskell-updates`:
```console
$ ./maintainers/scripts/haskell/merge-and-open-pr.sh PR_NUM_OF_CURRENT_HASKELL_UPDATES_PR
```
Find the PR number easily [here](https://github.com/nixos/nixpkgs/pulls?q=is%3Apr+is%3Aopen+head%3Ahaskell-updates)
This does the following things:
1. Fetches `origin`, makes sure you currently have the `haskell-updates`
branch checked out, and makes sure your currently checked-out
`haskell-updates` branch is on the same commit as
`origin/haskell-updates`.
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
`haskell-updates` PR on Nixpkgs. If you'd like to do this by hand,
look in the script for the recommended PR title and body text.