Skip to content

Update nixpkgs and various associated fixes#389

Merged
jfly merged 5 commits into
masterfrom
upgrade-nixpkgs
May 25, 2026
Merged

Update nixpkgs and various associated fixes#389
jfly merged 5 commits into
masterfrom
upgrade-nixpkgs

Conversation

@jfly
Copy link
Copy Markdown
Collaborator

@jfly jfly commented May 12, 2026

Note: There are multiple commits in here, I suggest reading them one at a time.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 12, 2026

Nixpkgs diff

@jfly jfly mentioned this pull request May 12, 2026
@jfly jfly self-assigned this May 12, 2026
@jfly jfly force-pushed the upgrade-nixpkgs branch from 44a4c8c to e064462 Compare May 17, 2026 19:04
@jfly
Copy link
Copy Markdown
Collaborator Author

jfly commented May 17, 2026

This PR is ready for review. It depends on #390, which proves that I addressed all the warnings introduced by the ghc update.

@jfly jfly force-pushed the upgrade-nixpkgs branch from e064462 to ef4e191 Compare May 20, 2026 16:58
@jfly jfly changed the title Update nixpkgs and remove obsolete treefmt patch Update nixpkgs and various associated fixes May 20, 2026
@jfly jfly force-pushed the upgrade-nixpkgs branch 3 times, most recently from 480e91d to b5cd75a Compare May 20, 2026 18:05
@jfly
Copy link
Copy Markdown
Collaborator Author

jfly commented May 20, 2026

I hadn't realized that our sync-pr.sh script requires every commit on a PR branch to successfully build. That's reasonable: I just rewrote history, and extracted the warning fixes into a prerequisite PR: #397 (fortunately these changes work and compile without warning on our existing version of GHC!)

RobertDeRose and others added 5 commits May 24, 2026 22:41
The treefmt parallel execution fix has been merged upstream, so the
fetchpatch overlay is no longer needed.

Also remove upper bounds in `nixfmt.cabal`

AFAICT, all we've ever done with these upper bounds is bump them.
They're failing now that we've bumped nixpkgs. Rather than continue to
kick the can, just remove them.

Justification: bounds like this make sense when you're a library in a
semver ecosystem. Others need to be able to link against you, ideally
without being forced to use the exact same version of all the things you
depend on. However, we are *not* a Haskell library (haskell is just an
implementation detail of the cli binary we build). We get
reproducibility by virtue of using the nixpkgs Haskell package set. When
we update nixpkgs, we rely upon our tests to tell us if anything broke.

Co-authored-by: Jeremy Fleischman <me@jfly.fyi>
With the updates came a new version of fourmolu. Here are the changes.
To address this warning:

> evaluation warning: nixfmt-rfc-style is now the same as pkgs.nixfmt which should be used instead.
I was seeing this warning:

```console
$ nix-build -A checks.reuse
/nix/store/7vlrdv22ai5ajs2p798md5a13g3j7p8q-python3.13-reuse-6.2.0/lib/python3.13/site-packages/reuse/project.py:332: PendingDeprecationWarning: '.reuse/dep5' is deprecated. You are recommended to instead use REUSE.toml. Use `reuse convert-dep5` to convert.
```

I fixed it by running `nix run --inputs-from . nixpkgs#reuse convert-dep5` at the root
of the repo.
I noticed that the newer version of `cabal check` that we have now has a
`--ignore` option, which lets us use ignore the warnings about missing
dependency bounds and the `werror` flag, I included justification inline.

We had the following errors which I did address:

```
Error: [git-protocol] Cloning over git:// might lead to an arbitrary code
execution vulnerability. Furthermore, popular forges like GitHub do not
support it. Use https:// or ssh:// instead.
These warnings will likely cause trouble when distributing the package:
Warning: [no-maintainer] No 'maintainer' field.
These warnings may cause trouble when distributing the package:
Warning: [doc-place] Please consider moving the file 'CHANGELOG.md' from the
'extra-source-files' section of the .cabal file to the section
'extra-doc-files'.
Error: Hackage would reject this package.
```

I added this check to ci, so we won't regress in the future.
@jfly jfly force-pushed the upgrade-nixpkgs branch from b5cd75a to cd56add Compare May 25, 2026 05:48
@jfly jfly marked this pull request as ready for review May 25, 2026 05:49
@jfly
Copy link
Copy Markdown
Collaborator Author

jfly commented May 25, 2026

This is (finally) ready for review!

Copy link
Copy Markdown
Contributor

@MattSturgeon MattSturgeon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@jfly jfly merged commit 7bf7f68 into master May 25, 2026
2 checks passed
@jfly jfly deleted the upgrade-nixpkgs branch May 25, 2026 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants