Skip to content

ghc/hadrian: Respect patches argument#283364

Closed
bgamari wants to merge 1 commit intoNixOS:masterfrom
bgamari:wip/hadrian-patches
Closed

ghc/hadrian: Respect patches argument#283364
bgamari wants to merge 1 commit intoNixOS:masterfrom
bgamari:wip/hadrian-patches

Conversation

@bgamari
Copy link
Contributor

@bgamari bgamari commented Jan 24, 2024

Description of changes

Previously any attempt to patch GHC would be subject to the restriction that patches would not be applied to the source tree used to build Hadrian. This is problematic as frequently Hadrian is evolved in conjunction with the compiler proper. Here we introduce a new patches argument to the common Hadrian derivation, allowing the user to specify patches that affect both Hadrian and the compiler build, e.g.:

haskell.compiler.ghc961.override { patches = [ ./wombat.patch ]; }

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added the 6.topic: haskell General-purpose, statically typed, purely functional programming language label Jan 24, 2024
@bgamari bgamari force-pushed the wip/hadrian-patches branch from 84950df to 17cbd62 Compare January 24, 2024 01:48
@ofborg ofborg bot requested review from expipiplus1 and guibou January 24, 2024 02:10
@ofborg ofborg bot added 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. labels Jan 24, 2024
@bgamari
Copy link
Contributor Author

bgamari commented Jan 24, 2024

Cc @sternenseemann, @maralorn, @guibou

@maralorn
Copy link
Member

This looks sensible to me. But sterni needs to judge.

@wolfgangwalther
Copy link
Contributor

I ran into exactly this issue a couple of days ago, seems to be a good change to me.

@eldritch-cookie
Copy link
Contributor

@sternenseemann this PR looks good but it is the 5th least recently updated...

@sternenseemann
Copy link
Member

I'd support this use case via #304652 which I think simplifies all the involved expressions.

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: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants