Skip to content

haskell.compiler.ghc{9{6,8},HEAD}: use patched ghcSrc across all involved derivations#304652

Merged
sternenseemann merged 2 commits intoNixOS:haskell-updatesfrom
sternenseemann:common-hadrian-shared-src
Apr 27, 2024
Merged

haskell.compiler.ghc{9{6,8},HEAD}: use patched ghcSrc across all involved derivations#304652
sternenseemann merged 2 commits intoNixOS:haskell-updatesfrom
sternenseemann:common-hadrian-shared-src

Conversation

@sternenseemann
Copy link
Member

Description of changes

I think this is the way to untangle this mess. It allows for the use case that motivated #283364, but without making everything even more complicated (e.g. #283364 would have required threading the patches argument to two extra places now).

Extra details in the commit messages.

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 Apr 16, 2024
@ofborg ofborg bot requested review from cdepillabout, expipiplus1 and guibou April 16, 2024 23:44
@ofborg ofborg bot added 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must 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: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. labels Apr 16, 2024
Copy link
Member

@maralorn maralorn left a comment

Choose a reason for hiding this comment

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

It does not feel very pretty, because we kinda side-step the normal patch mechanism.
But I guess it is more robust and flexible.

Besides that I trust your judgement on this.

@wegank wegank added 12.approvals: 1 This PR was reviewed and approved by one person. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages. labels Apr 19, 2024
We'll want to (slowly) unify the source used by the different
derivations we use to build GHC. As a first step, use the same base
source for building GHC and all hadrian related packages. This is
achieved by wrapping the fetcher result in `srcOnly` to apply GHC
patches immediately.

To modify the patches (and source) used by GHC we now have a changed
overriding interface for >= 9.6:

```
oldGhc.override {
  ghcSrc = oldGhc.src.overrideAttrs (oldAttrs: {
    src = …;
    patches = …;
  });
}
```
This makes the hadrian expressions much simpler as we no longer need to
thread through extra arguments for special workarounds.
common-hadrian.nix decides in one place which patches we need and
directly applies them to the source used to build everything.
@sternenseemann sternenseemann force-pushed the common-hadrian-shared-src branch from aae935a to f0f9bf4 Compare April 27, 2024 13:01
@sternenseemann
Copy link
Member Author

I've removed the patchedSrc attribute since it's redundant (i.e. it's the same as src). Overriding instructions in the commit message have been adjusted accordingly.

Going to merge now, so that it is batched with the set rebuild that we have to do anyways.

@sternenseemann sternenseemann merged commit c93aff1 into NixOS:haskell-updates Apr 27, 2024
@sternenseemann sternenseemann deleted the common-hadrian-shared-src branch April 27, 2024 13:03
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. and removed 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must 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: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. labels Apr 27, 2024
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: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. 12.approvals: 1 This PR was reviewed and approved by one person. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants