How is a haskell package marked as broken?

Here’s a gist.
I’m seeing strange behaviour:

nix-repl> (import ./test.nix).meta.broken

nix-repl> (import ./test.nix).version

And strangely:

nix-repl> (import ./test.nix)
error: Package ‘amazonka-core-1.6.1’ in /nix/store/n0w3wy2a7z71wpf5ldfqmdkps3b3i4gg-nixpkgs-src/pkgs/development/haskell-modules/hackage-packages.nix:29521 is marked as broken, refusing to evaluate

Which has two issues:

  1. The version as per the derivation name is 1.6.1 which is different from the version in .version.
  2. meta.broken is false, yet nix rejects the package.

I’d like to understand what is going on and how to override packages that are broken for specific GHC versions.

I’ll reply on the original thread which should suffice…

Thanks, but I’m not sure if this is the same issue.

It’s the same issue.

Allright, my feeling was:

  • this doesn’t happen when not using recursiveUpdate and just overriding packages in haskellPackages (which can be overriden without using recursiveUpdate, as in the previous use-case we had).

Therefore, this seems more an issue with how overlays work when using recursiveUpdate, which you need to use for using specific GHC versions as in the original thread.

It’s more an issue with how the haskell package sets’ fix points interact with the nixpkgs fix point which are both changed in the overlay. (This is also why overriding haskellPackages “works”, haskellPackages fix point is exposed at haskell.packages.ghc928, so overriding it is more similar to a rename.)