Commit graph

135 commits

Author SHA1 Message Date
Wolfgang Walther 631661e66c
haskellPackages.cabal2nix-unstable: override with unstable dependencies
These dependencies need to be pulled from the same unstable commit that
cabal2nix is pulled from, otherwise changes to any of them will not be
in effect and possibly break the build.
2025-09-01 14:10:36 +02:00
Wolfgang Walther 453d0f8eab
haskellPackages.cabal2nix-unstable: set version according to contribution guidelines
The contribution guidelines require an unstable version to be leading
with a real version, or if none is available with `0-`.

This is because certain Nix operations split a package's full name into
name and version component starting with the first section starting with
a digit.
2025-08-29 12:26:30 +02:00
sternenseemann bbefb1d462 maintainers/hydra-report.hs: migrate to nix-eval-jobs
Hydra unilaterally removed hydra-eval-jobs, so we need to figure out how
to migrate to nix-eval-jobs. I can't shake the feeling that it's slower.
Maybe we need to increase the resource limitations for nix-eval-jobs.

nix-eval-jobs no longer produces a big JSON object, but instead one
object per line (one for each job). This is supported in a simple way by
readJSONLinesProcess. It'd be possible to implement this without
presupposing that there's one object per line, however, it is not an
usecase exactly intended by aeson, it seems.

nix-eval-jobs makes our job easier in some ways, e.g. jobs have a proper
meta set now, so we no longer need to cross reference a mail address to
github handle map. There is even room for further improvement, e.g.
attribute paths can just be queried instead of generating them using
Text.splitOn.

See also https://github.com/NixOS/hydra/pull/1421.
2025-08-12 14:29:35 +02:00
sternenseemann e0f8791259 maintainers/haskell/hydra-report.hs: use eitherDecodeStrictText 2025-08-12 14:29:35 +02:00
sternenseemann 7dfed14799 haskellPackages.cabal2nix-unstable: don't wrap with runtime deps
cabal2nix-unstable is mostly used for regenerating the Haskell package
set. Thus we should aim to make it quick to rebuild in case its hash
changes because of Haskell related changes.

- cabal2nix is not fussy about the Nix version it uses for nix-env(1)
  and we can just assume it is already in PATH like we do for
  maintainers/scripts/haskell/*.

- nix-prefetch-scripts causes the most trouble since its python
  dependencies depend on pandoc, so many Haskell changes require
  an additional Python rebuild when building cabal2nix-unstable.

  nix-prefetch-scripts is most likely installed and not necessary in
  many cases, e.g. hackage2nix doesn't need them which is the main use
  we have for cabal2nix-unstable. For the update scripts that do need
  them, we add them to the used nix-shell explicitly.
2025-07-30 13:02:47 +02:00
sternenseemann 8fec8af67a haskellPackages.cabal2nix-unstable: use separate bin output 2025-07-30 13:02:47 +02:00
nixpkgs-ci[bot] 7873608739
Merge cda03d762a into haskell-updates 2025-07-19 00:22:11 +00:00
sternenseemann 0545642ebb maintainers/update-{st,h}ackage.sh: drop support for --do-commit 2025-07-18 00:45:30 +02:00
sternenseemann 250924fd7d maintainers/update-hackage.sh: don't print diff if no changes
Bug introduced in 1158f20f15.
2025-07-18 00:45:30 +02:00
Silvan Mosberger b68cc636d3 treewide: Remove nixfmt-rfc-style from update script shebangs
Based on the Nixpkgs used and the version of nixfmt-rfc-style in that
version, it's likely that not the correct version is used.

Update scripts should instead run within a Nixpkgs development shell
(`nix-shell`/`nix develop`/`direnv`), where the correct version of
`nixfmt` (although `treefmt` should be preferred) is always available.
2025-07-15 23:27:22 +02:00
sternenseemann 34c51b70fb maintainers/scripts/haskell: unify pkg set update into single commit
Currently, every package set consists of three commits, generated by
update-hackage.sh, update-stackage.sh and
regenerate-hackage-packages.sh, respectively. This is suboptimal, as it
necessarly causes intermediate states of Nixpkgs where the generated
hackage-packages.nix and all-cabal-hasehs and/or the hackage2nix
configuration files are out of sync. Ideally, running
regenerate-hackage-packages.sh is a no-op for every Nixpkgs revision.

This is achieved by adding a wrapper script, update-package-set.sh,
which runs the individual moving parts and commits the result.
2025-07-10 18:06:02 +02:00
sternenseemann 5e758ae573 maintainers/haskell/regen-h-packages.sh: let user edit commit msg
Calling git commit with --edit here, allows the user to rephrase the
very nondescript default message, in doing so e.g. clarifying why the
regeneration was necessary etc. This should hopefully encourage better
commit mesages.
2025-07-10 18:06:02 +02:00
sternenseemann f834f1dacc maintainers/scripts/haskell: briefer commit message bodies
The “This commit was generated by …” message is very wordy and often
exceeds 72 characters which is a good (loose) target for wrapping lines
in commit messages.
2025-07-10 18:06:02 +02:00
sternenseemann 1158f20f15 maintainers/haskell/update*: print version diff when not committing
This allows other scripts to detect whether anything changed without
resorting to git-diff(1): If nothing changed, stdout will be empty (i.e.
we now enforce that other messages go to stderr). To make sure that this
behavior is retained in the future, the scripts' behavior is briefly
documented in the files' header.
2025-07-10 18:06:02 +02:00
sternenseemann c85656eae6 maintainers/scripts/haskell: don't redundantly add C++ Nix to env
Since the shebang calls nix-shell, we can safely assume that Nix (Lix,
C++ Nix) is installed. Our scripts should support a wide enough range of
Nix versions so that using the “impure” version of the tool is not a
problem.

This works around #400784. My theory is that the Nix frontend commands
no longer work with older versions of the Nix daemon nor the Lix daemon
in our workloads.
2025-06-30 16:18:48 +02:00
Wolfgang Walther b2bd43391d
maintainers/scripts/haskell: sort case- and locale-insensitively consistently
sort -i actually means "ignore nonprinting", not "ignore case". Also, we
need to set LC_ALL to get proper sorting for "-".
2025-05-05 22:13:07 +02:00
Wolfgang Walther c1e7bdadb0
maintainers/scripts/haskell/regenerate-hackage-packages.sh: run nixfmt without --fast as well 2025-04-06 11:35:14 +02:00
Wolfgang Walther 4b1644526a
maintainers/scripts/haskell/regenerate-hackage-packages.sh: run nixfmt on hackage-packages.nix 2025-04-05 14:20:08 +02:00
Wolfgang Walther 13517dc5da maintainers/scripts/haskell: add unbreak.nu script
The new script runs through all packages marked as broken in
broken.yaml, tries to build them, and removes them from the file if they
do.
2025-02-17 01:59:39 +01:00
sternenseemann b3d74de2a1 maintainers/haskell/merge-and-open-pr.sh: target staging
We can't update the package list after the merge since it may be weeks
until the changes propagate to master and the channels.
2025-02-12 12:34:15 +01:00
sternenseemann aec8443097 haskellPackages: stackage LTS 22.43 -> LTS 23.3
This commit has been generated by maintainers/scripts/haskell/update-stackage.sh
2025-01-08 19:30:09 +01:00
sternenseemann ca5dc07d37 haskellPackages: stackage LTS 22.40 -> LTS 22.43
This commit has been generated by maintainers/scripts/haskell/update-stackage.sh
2024-12-26 15:41:54 +01:00
sternenseemann b3692b3250 haskellPackages.cabal2nix-unstable: 2024-12-04 -> 2024-12-22
Includes https://github.com/NixOS/cabal2nix/pull/638.
2024-12-22 13:47:07 +01:00
Silvan Mosberger 84d4f874c2 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev 78e9caf153
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:23:58 +01:00
Sandro Jäckel 55760e4c10 hydra: rename from hydra_unstable
There is no stable hydra package
2024-08-29 13:56:32 +10:00
sternenseemann 9919b666ab haskell.packages.ghc{96,98}.cabal-install: fix build of 3.12
With cabal-install >= 3.12, we need to adjust our cabal-install overlay
once again.

- Due to the new dependency semaphore-compat, which appears to require
  unix >= 2.8 it is very difficult to get to work for GHC < 9.6 (but
  probably possible). Technically, using pkgs.cabal-install should
  always be fine, so there's no strict need for cabal-install to work
  with every GHC. Let's drop support for GHC < 9.6 for now.

- Make sure that cabal-install-solver also uses the latest version
  always.

- Due to Cabal 3.12, we need to deviate from Stackage for
  hackage-security. cabal-install does support the standard version of
  resolv now, though.
2024-07-25 16:54:51 +02:00
Naïm Favier 9f983a6c27
maintainers/haskell/hydra-report: slightly optimise get-report --slow
There's no need to fetch the eval again, we have it right there.
2024-03-30 13:56:58 +01:00
Naïm Favier 73add9a862
maintainers/haskell/hydra-report: add optional id argument to get-report
Useful if we ever need to reproduce the report for a previous
evaluation.
2024-03-30 13:56:58 +01:00
maralorn b9cae33009 haskellPackages.cabal2nix-unstable: 2024-01-04 -> 2024-02-05 2024-02-05 23:32:27 +01:00
Naïm Favier 18456d10ef
maintainers/scripts/haskell: optimise calculateReverseDependencies
Use an IntMap rather than a list for the fixpoint computation.
2024-01-14 17:46:48 +01:00
Naïm Favier afb843b80f
maintainers/scripts/haskell: ignore self-dependencies
These create trivial loops in the dependency graph, which make the
transitive closure computation loop.
2024-01-14 17:46:04 +01:00
sternenseemann 854b534052 haskellPackages: stackage LTS 21.25 -> LTS 22.4
This commit has been generated by maintainers/scripts/haskell/update-stackage.sh
2024-01-07 14:14:09 +01:00
sternenseemann 4a227da543 haskellPackages: stackage LTS 21.23 -> LTS 21.25
This commit has been generated by maintainers/scripts/haskell/update-stackage.sh
and maintainers/scripts/haskell/regenerate-hackage-packages.sh.

Add capability to update to an out of date solver in update-stackage.sh.
2024-01-04 13:31:30 +01:00
Naïm Favier 1a1a8d2559
maintainers/scripts/merge-and-open-pr: fix error handling
Calling `die` in a subshell hides the error message.
2023-12-04 19:06:30 +01:00
Naïm Favier 5f1da6e045
scripts/haskell/hydra-report: use inline emoji
GitHub broke the rendering of colon emoji codes inside square brackets;
let's just use emoji.
2023-12-03 13:06:38 +01:00
Anthony Roussel e30f48be94
treewide: fix redirected and broken URLs
Using the script in maintainers/scripts/update-redirected-urls.sh
2023-11-11 10:49:01 +01:00
Dennis Gosnell f754973d14
haskell hydra-report: bump timeout for all requests to Hydra
In practice, almost all requests to Hydra take longer than the default
timeout of 30 seconds.

This commit bumps all requests to the max timeout of 15 minutes.  This
should hopefully make the hdyra-report.hs script more reliable and fail
less.
2023-11-02 10:29:42 +09:00
maralorn ba46866a27
maintainers/scripts/haskell: Fix a typo 2023-09-06 00:06:02 +02:00
sternenseemann 5a835f6742 maintainers/haskell/mark-broken.sh: allow passing --no-request-logs
This flag needs to be passed through to hydra-report.hs.
2023-09-03 22:15:15 +02:00
sternenseemann 71cbb538a5 maintainers/haskell/hydra-report.hs: increase timeout to 15min
This seems to be the server side Hydra timeout as well, so it makes
sense waiting as long as Hydra will try to give a response.
2023-09-03 21:56:38 +02:00
sternenseemann 76dc153544 maintainers/haskell/hydra-report.hs: work around bulk status timeout
This change adds a flag --slow to hydra-report.sh get-report which
causes it to fetch the cheap evaluation overview endpoint (which only
contains build ids and meta data). The gathered information is then used
to request each build's status individually instead of in bulk which is
very slow, but useful as a last resort if the bulk endpoint times out.
2023-09-03 21:54:03 +02:00
sternenseemann 00b0824635 maintainers/haskell/hydra-report.hs: allow disabling log requesting
Since every failure in the jobset means one request to get the log when
generating the list of newly broken packages, we need to add an option
to disable log requesting in case a lot of new breakage needs to be
entered.
2023-09-03 21:39:04 +02:00
Dennis Gosnell 6f41cccb9e
haskell: don't pin stack to version in LTS, but take the latest from hackage 2023-07-26 11:09:53 +09:00
Theodore Ni ac69020750
treewide: remove unused nix-prefetch-github from shebangs 2023-07-18 18:16:17 -07:00
sternenseemann 6dcc0ab9b5 maintainers/haskell/merge-and-open-pr: only push haskell-updates
If we want to push only one branch, we'll have to specify branch and
remote explicitly. Pushing to origin doesn't work for everyone, since
some of us have a origin remote that can't be pushed to. Using plain
`git push` has the problem that it'll try pushing all checked out
branchs which fails e.g. if some branches (staging, staging-next, …) are
behind their remote counterparts.

The solution is to require everyone to configure a per branch pushRemote
for haskell-updates which will then be used by merge-and-open-pr.sh.
2023-05-19 16:33:56 +02:00
maralorn ef41eed24f maintainers/scripts/haskell/*transitive-broken*: Fix an error message 2023-05-02 12:07:16 +02:00
maralorn 05e9a22322 maintainers/scripts/haskell/regenerate-transitive-broken-packages.sh: Make more robust against eval errors 2023-05-01 02:36:37 +02:00
maralorn 1cfb18d793 maintainers/scripts/haskell/merge-and-open-pr.sh: Pass --fast to regeneration script 2023-05-01 02:23:54 +02:00
maralorn e4b66fa1a1 maintainers/scripts/haskell: Integrate transitive-broken into regeneration script 2023-04-23 10:47:36 +02:00
sternenseemann b79286ea28 maintainers/haskell/upload-package-list: support 3.10 config dir
cabal-install 3.10 has some quirky new logic for config, cache, …
directory discovery. We reimplement this in this simple bash script,
additionally respecting the CABAL_DIR environment variable.
2023-04-14 18:35:33 +02:00