Skip to content

haskellPackages.warp: stop including Paths_ module by default#483175

Merged
sternenseemann merged 1 commit intoNixOS:haskell-updatesfrom
lf-:jade/push-wqwspqxmxqqv
Jan 24, 2026
Merged

haskellPackages.warp: stop including Paths_ module by default#483175
sternenseemann merged 1 commit intoNixOS:haskell-updatesfrom
lf-:jade/push-wqwspqxmxqqv

Conversation

@lf-
Copy link
Member

@lf- lf- commented Jan 23, 2026

This was made possible to disable, which we should really probably just do. It might make some HTTP servers not return their version in a header, but that feels like an antipattern anyhow.

See: yesodweb/wai#1044
See:

# Workarounds for justStaticExecutables on aarch64-darwin. Since dead code
# elimination barely works on aarch64-darwin, any package that has a
# dependency that uses a Paths_ module will incur a reference on GHC, making
# it fail with disallowGhcReference (which is set by justStaticExecutables).
#
# To address this, you can either manually remove the references causing this
# after verifying they are indeed erroneous (e.g. cabal2nix) or just disable
# the check, sticking with the status quo. Ideally there'll be zero cases of
# the latter in the future!
cabal2nix = overrideCabal (old: {

I did try to use nix why-depends to verify that this is actually changing the things appearing in a .a file but didn't see anything in the diff. I am nonetheless submitting this patch because I did have this problem in practice at work; it's slightly hard to pin down the exact circumstances leading to it presenting itself.

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

This was made possible to disable, which we should really probably just
do. It might make some HTTP servers not return their version in a
header, but that feels like an antipattern anyhow.

See: yesodweb/wai#1044
See: https://github.com/NixOS/nixpkgs/blob/ecdb2e3a81213177cde9ce769e5f086ff24387b6/pkgs/development/haskell-modules/configuration-darwin.nix#L363-L372
@nixpkgs-ci nixpkgs-ci bot requested a review from wolfgangwalther January 23, 2026 21:02
@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-linux: 1001-2500 This PR causes many rebuilds on Linux and should target the staging branches. 10.rebuild-darwin: 501-1000 This PR causes many rebuilds on Darwin and should normally target the staging branches. 6.topic: haskell General-purpose, statically typed, purely functional programming language labels Jan 23, 2026
Copy link
Member

@sternenseemann sternenseemann left a comment

Choose a reason for hiding this comment

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

Since this is such a big rebuild, I'd merge it in the next rotation.

@nixpkgs-ci nixpkgs-ci bot added the 12.approvals: 1 This PR was reviewed and approved by one person. label Jan 24, 2026
@sternenseemann sternenseemann added this pull request to the merge queue Jan 24, 2026
Merged via the queue into NixOS:haskell-updates with commit 5cf564a Jan 24, 2026
35 of 37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: haskell General-purpose, statically typed, purely functional programming language 10.rebuild-darwin: 501-1000 This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 1001-2500 This PR causes many rebuilds on Linux and should target the staging branches. 12.approvals: 1 This PR was reviewed and approved by one person.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants