Skip to content

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

Closed
lf- wants to merge 1 commit intoNixOS:masterfrom
lf-:jade/push-wqwspqxmxqqv
Closed

haskellPackages.warp: stop including Paths_ module by default#483172
lf- wants to merge 1 commit intoNixOS:masterfrom
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
@lf-
Copy link
Member Author

lf- commented Jan 23, 2026

dammit, wrong branch.

@lf- lf- closed this Jan 23, 2026
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

The PR's base branch is set to master, but this PR causes 1719 rebuilds.
It is therefore considered a mass rebuild.
Please change the base branch to the right base branch for your changes (probably staging).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant