Skip to content

Comments

[24.05] Haskell backports (cabal2nix, GHC expression refactor)#314679

Merged
sternenseemann merged 15 commits intoNixOS:staging-24.05from
sternenseemann:backport-312934
May 26, 2024
Merged

[24.05] Haskell backports (cabal2nix, GHC expression refactor)#314679
sternenseemann merged 15 commits intoNixOS:staging-24.05from
sternenseemann:backport-312934

Conversation

@sternenseemann
Copy link
Member

Description of changes

Backport of #312934. We mainly want

  • The GHC expression refactors (which only change patch order / whitespace), so we can backport future GHC changes.
  • A new (minor) version of distribution-nixpkgs, so cabal2nix deals with javascript-unknown-ghcjs as it should. Sadly, this requires a Hackage bump and some unrelated changes to keep the package set working properly.

ncfavier and others added 15 commits May 25, 2024 22:56
This commit has been generated by maintainers/scripts/haskell/update-hackage.sh

(cherry picked from commit 0811c85)
This commit has been generated by maintainers/scripts/haskell/regenerate-hackage-packages.sh

(cherry picked from commit 517b3e7)
Haddock overrides aren't ported over since the package is marked as
broken anyways.

(cherry picked from commit 22d0719)
This commit has been generated by maintainers/scripts/haskell/update-hackage.sh

(cherry picked from commit 3325a9b)
This only reorders the patches in some cases, as can be seen by
comparing the patch lists using before and after this change:

 ghc902:
+  * /nix/store/648bdlavl7b09llwsvgzxlf3kj8di0mg-1482.patch
   * /nix/store/a6i4qgs42rmfvlclpqb5c4np7p66sbwx-ghc-docs-sphinx-6.0.patch
   * /nix/store/dxnmnf26y1mj6d4rd6r9nglbwlidqxl9-docs-sphinx-7.patch
-  * /nix/store/648bdlavl7b09llwsvgzxlf3kj8di0mg-1482.patch
   * /nix/store/cixlb1974spszv897qklibd6avlwk8ic-ghc-9.0.2-fcompact-unwind.patch
 ghc925:
+  * /nix/store/648bdlavl7b09llwsvgzxlf3kj8di0mg-1482.patch
   * /nix/store/a6i4qgs42rmfvlclpqb5c4np7p66sbwx-ghc-docs-sphinx-6.0.patch
   * /nix/store/dxnmnf26y1mj6d4rd6r9nglbwlidqxl9-docs-sphinx-7.patch
-  * /nix/store/648bdlavl7b09llwsvgzxlf3kj8di0mg-1482.patch
   * /nix/store/vm78w4fi23blaqq2ahl3m5842yri7lik-6c796218c92f93c95e94d5ec2d077f6956f68e98.patch
 ghc926:
+  * /nix/store/648bdlavl7b09llwsvgzxlf3kj8di0mg-1482.patch
   * /nix/store/a6i4qgs42rmfvlclpqb5c4np7p66sbwx-ghc-docs-sphinx-6.0.patch
   * /nix/store/dxnmnf26y1mj6d4rd6r9nglbwlidqxl9-docs-sphinx-7.patch
-  * /nix/store/648bdlavl7b09llwsvgzxlf3kj8di0mg-1482.patch
   * /nix/store/vm78w4fi23blaqq2ahl3m5842yri7lik-6c796218c92f93c95e94d5ec2d077f6956f68e98.patch
 ghc927:
+  * /nix/store/648bdlavl7b09llwsvgzxlf3kj8di0mg-1482.patch
   * /nix/store/a6i4qgs42rmfvlclpqb5c4np7p66sbwx-ghc-docs-sphinx-6.0.patch
   * /nix/store/dxnmnf26y1mj6d4rd6r9nglbwlidqxl9-docs-sphinx-7.patch
-  * /nix/store/648bdlavl7b09llwsvgzxlf3kj8di0mg-1482.patch
   * /nix/store/vm78w4fi23blaqq2ahl3m5842yri7lik-6c796218c92f93c95e94d5ec2d077f6956f68e98.patch
 ghc928:
+  * /nix/store/648bdlavl7b09llwsvgzxlf3kj8di0mg-1482.patch
   * /nix/store/a6i4qgs42rmfvlclpqb5c4np7p66sbwx-ghc-docs-sphinx-6.0.patch
   * /nix/store/dxnmnf26y1mj6d4rd6r9nglbwlidqxl9-docs-sphinx-7.patch
-  * /nix/store/648bdlavl7b09llwsvgzxlf3kj8di0mg-1482.patch
   * /nix/store/vm78w4fi23blaqq2ahl3m5842yri7lik-6c796218c92f93c95e94d5ec2d077f6956f68e98.patch
 ghc945:
-  * /nix/store/vm78w4fi23blaqq2ahl3m5842yri7lik-6c796218c92f93c95e94d5ec2d077f6956f68e98.patch
   * /nix/store/a6i4qgs42rmfvlclpqb5c4np7p66sbwx-ghc-docs-sphinx-6.0.patch
   * /nix/store/dxnmnf26y1mj6d4rd6r9nglbwlidqxl9-docs-sphinx-7.patch
-ghc946:
   * /nix/store/vm78w4fi23blaqq2ahl3m5842yri7lik-6c796218c92f93c95e94d5ec2d077f6956f68e98.patch
+ghc946:
   * /nix/store/dxnmnf26y1mj6d4rd6r9nglbwlidqxl9-docs-sphinx-7.patch
+  * /nix/store/vm78w4fi23blaqq2ahl3m5842yri7lik-6c796218c92f93c95e94d5ec2d077f6956f68e98.patch
   * /nix/store/grgg5qjcwj5n8dyp50z4gwfd9vig09px-9.4.6-bytestring-posix-source.patch
 ghc947:
-  * /nix/store/vm78w4fi23blaqq2ahl3m5842yri7lik-6c796218c92f93c95e94d5ec2d077f6956f68e98.patch
   * /nix/store/dxnmnf26y1mj6d4rd6r9nglbwlidqxl9-docs-sphinx-7.patch
-ghc948:
   * /nix/store/vm78w4fi23blaqq2ahl3m5842yri7lik-6c796218c92f93c95e94d5ec2d077f6956f68e98.patch
+ghc948:
   * /nix/store/dxnmnf26y1mj6d4rd6r9nglbwlidqxl9-docs-sphinx-7.patch
+  * /nix/store/vm78w4fi23blaqq2ahl3m5842yri7lik-6c796218c92f93c95e94d5ec2d077f6956f68e98.patch

(cherry picked from commit ea9498a)
Conditional whitespace was only necessary to prevent rebuilds. We can
now revert this since it doesn't make a functional difference.

(cherry picked from commit 131d97d)
Without the change the eval fails as:

    $ nix build --no-link -f. haskell.packages.ghc865Binary.exceptions
    error: attribute 'exceptions_0_10_7' missing
           at pkgs/development/haskell-modules/configuration-ghc-8.6.x.nix:98:16:
               97|   # This became a core library in ghc 8.10., so we don’t have an "exception" attribute anymore.
               98|   exceptions = self.exceptions_0_10_7;
                 |                ^
               99|
           Did you mean exceptions_0_10_8?

(cherry picked from commit 8b65aca)
Without the change the eval fails as:

    $ nix build --no-link -f. haskell.packages.ghcjs.exceptions
    error:
           … in the left operand of the update (//) operator
             at pkgs/development/haskell-modules/lib/compose.nix:40:7:
               39|     mkDerivation = drv: (args.mkDerivation drv).override f;
               40|   })) // {
                 |       ^
               41|     overrideScope = scope: overrideCabal f (drv.overrideScope scope);

           error: attribute 'exceptions_0_10_7' missing
           at pkgs/development/haskell-modules/configuration-ghcjs.nix:30:26:
               29|   stm = doJailbreak self.stm_2_5_3_1;
               30|   exceptions = dontCheck self.exceptions_0_10_7;
                 |                          ^
               31|
           Did you mean exceptions_0_10_8?

(cherry picked from commit b1f5c64)
This commit has been generated by maintainers/scripts/haskell/regenerate-hackage-packages.sh

(cherry picked from commit 07641f2)
This commit has been generated by maintainers/scripts/haskell/mark-broken.sh based on
*evaluation [1806530](https://hydra.nixos.org/eval/1806530) of nixpkgs commit [edc6c26](https://github.com/NixOS/nixpkgs/commits/edc6c261ab4ffb277af409e37a52718a91b255bc) as of 2024-05-25 11:49 UTC*
from the haskell-updates jobset on hydra under https://hydra.nixos.org/jobset/nixpkgs/haskell-updates

(cherry picked from commit d8550b8)
@github-actions github-actions bot added the 6.topic: haskell General-purpose, statically typed, purely functional programming language label May 25, 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.

I agree this is a good idea.

@ofborg ofborg bot added 8.has: clean-up This PR removes packages or removes other cruft 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 2501-5000 This PR causes many rebuilds on Darwin and should 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: 2501-5000 This PR causes many rebuilds on Linux and should target the staging branches. labels May 25, 2024
@sternenseemann sternenseemann merged commit db36cb4 into NixOS:staging-24.05 May 26, 2024
@sternenseemann sternenseemann deleted the backport-312934 branch May 26, 2024 09:19
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 8.has: clean-up This PR removes packages or removes other cruft 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 2501-5000 This PR causes many rebuilds on Darwin and should 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: 2501-5000 This PR causes many rebuilds on Linux and should target the staging branches.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants