Skip to content

haskell.packages.ghc94.ormolu: fix eval by bumping version#217238

Merged
maralorn merged 1 commit intoNixOS:haskell-updatesfrom
raehik:ghc94-ormolu-pin-bump
Feb 20, 2023
Merged

haskell.packages.ghc94.ormolu: fix eval by bumping version#217238
maralorn merged 1 commit intoNixOS:haskell-updatesfrom
raehik:ghc94-ormolu-pin-bump

Conversation

@raehik
Copy link
Contributor

@raehik raehik commented Feb 19, 2023

Description of changes

The ormolu pin in configuration-ghc-9.4.x.nix looks for version 0.5.2.0, but the one currently available in nixpkgs is 0.5.3.0 (released on Hackage late Jan). Commands like nix build haskell.packages.ghc94.ormolu fail with the following error:

error: attribute 'ormolu_0_5_2_0' missing

       at /nix/store/...-source/pkgs/development/haskell-modules/configuration-ghc-9.4.x.nix:198:25:

          197|   # https://github.com/tweag/ormolu/issues/941
          198|   ormolu = doDistribute self.ormolu_0_5_2_0;
             |                         ^
          199|   fourmolu = overrideCabal (drv: {
       Did you mean one of ormolu_0_5_3_0 or ormolu_0_2_0_0?

Following the former suggestion fixes the issue.

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • 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/)
  • 23.05 Release Notes (or backporting 22.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.

@raehik raehik changed the base branch from master to haskell-updates February 19, 2023 22:22
@github-actions github-actions bot added the 6.topic: haskell General-purpose, statically typed, purely functional programming language label Feb 19, 2023
@raehik
Copy link
Contributor Author

raehik commented Feb 19, 2023

A temporary fix in the meantime would be nice too, but I don't know how to override configuration-ghc-9.4.x.nix, if it's even possible.

@raehik raehik changed the title GHC 9.4 ormolu pin bump GHC 9.4.x ormolu pin bump Feb 19, 2023
@ofborg ofborg bot added 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: 1001-2500 This PR causes many rebuilds on Darwin and should most likely 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. 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: 1001-2500 This PR causes many rebuilds on Darwin and should most likely 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 Feb 19, 2023
@maralorn
Copy link
Member

Thank you for this PR! Content looks fine.

Can you please reword the commit to something like haskell.packages.ghc94.ormolu: Fix eval by bumping version. (The part in front of the colon is the important one to fit our contributing guidelines.)

The PR framing might be a bit misleading. ormolu is not a dependency of ghc, so it does not break its build.
Most likely you are using a dev-environment which depends on ormolu.

@maralorn
Copy link
Member

Oh, and you can totally fix this in the interim with an overlay. It should work with something like

haskell.packages.ghc94.override { overrides = [ (final: prev: { ormolu = final.ormolu_0_5_3_0; })  ]; }

@raehik
Copy link
Contributor Author

raehik commented Feb 20, 2023

It works with haskell.packages.ghc94.override { overrides = final: prev: { ormolu = final.ormolu_0_5_3_0; }; };! Thanks. I'll tidy up this PR as you said. (My limited knowledge on the Haskell setup in Nix & my use of haskell-flake had me thinking haskell.packages.ghc94 was the compiler, apologies.)

@raehik raehik force-pushed the ghc94-ormolu-pin-bump branch from 0f2f335 to 653dc22 Compare February 20, 2023 00:53
@raehik raehik changed the title GHC 9.4.x ormolu pin bump haskell.packages.ghc94.ormolu: fix eval by bumping version Feb 20, 2023
@maralorn
Copy link
Member

Thanks!

@maralorn maralorn marked this pull request as ready for review February 20, 2023 11:12
@maralorn maralorn merged commit fd2bb26 into NixOS:haskell-updates Feb 20, 2023
@raehik raehik deleted the ghc94-ormolu-pin-bump branch February 21, 2023 16:52
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: package (new) This PR adds a new package 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments