ghc: Add variantSuffix, fix musl+integer-simple#138524
ghc: Add variantSuffix, fix musl+integer-simple#138524nh2 wants to merge 3 commits intoNixOS:haskell-updatesfrom
variantSuffix, fix musl+integer-simple#138524Conversation
d7d99e4 to
bc5a969
Compare
|
I can confirm that this works in my project ( |
* Experiment: Bump nixpkgs to latest master This is to see if there are problems coming up. Some of the things in nix/haskell-packages.nix can probably be cleaned up now. Originally https://github.com/dfinity-lab/ic-ref/commit/dce1286a900525607fcc21171b82940e3ec3385f * Bump again Originally https://github.com/dfinity-lab/ic-ref/commit/b43f83609fd3a99e0a8ecd8700f4baee0c53b863 * Bump once more Originally https://github.com/dfinity-lab/ic-ref/commit/a0746ed7be49c8f1619e5b75ba84d5c832730cf8 * Fix merge issue * Fix path * Back to master * Try winter master * Remove many haskell package changes * More simplification and upstream cache use * Update freeze file * Less versionoverrides needed * Remove nix/haskell-packages, more DNRY * Fix patch handling * Add .gitattributes to mark generated files as such * s/ / / * Run github actions with ghc-8.10.7 * Fix docs jobs * Fix docs jobs some more * Update cabal.project * Bump candid some more * Checkout before setting up the cache * Fix cabal keys * Don’t set active-repositories in freeze file * Rename workflow * naersk changed it seems * Try pkgsStatic, not pkgsMusl as the latter doesn’t seem to work any more since NixOS/nixpkgs#130441 * Fix static cborg build * Try static-haskell-nix * Revert "Try static-haskell-nix" This reverts commit b375ad4. * Revert "Try pkgsStatic, not pkgsMusl" This reverts commit d1f64f1. * Try pkgsMusl again pulling in NixOS/nixpkgs#138429 * Update freeze file * Right GHC version * Try NixOS/nixpkgs#138524
There was a problem hiding this comment.
Appending something to a derivation name is usually a bad idea since builtins.parseDrvName interprets everything after the first number after a dash as the version.
We are already doing this for the binary ones, but we shouldn't expand this. So let's take this opportunity to redo the naming of the binary derivations as well and move the -binary suffix before the version number (maybe in a separate commit?):
| name = "ghc-${version}-binary${binDistUsed.variantSuffix}"; | |
| name = "ghc-binary${binDistUsed.variantSuffix}-${version}"; |
Of course would need to be reflected in the other derivations as well. If you don't feel like doing it, I can also take care of that for you.
There was a problem hiding this comment.
That's a good point.
I think we should do it the way you suggest.
There was a problem hiding this comment.
This was done in #139164 which I've already merged into haskell-updates (with the variant suffix changes as well).
pkgs/top-level/haskell-packages.nix
Outdated
There was a problem hiding this comment.
You can drop the aarch64-darwin condition above, since stdenv.isAarch64 will also catch that.
pkgs/top-level/haskell-packages.nix
Outdated
There was a problem hiding this comment.
You can drop the aarch64-darwin condition above, since stdenv.isAarch64 will also catch that.
pkgs/top-level/haskell-packages.nix
Outdated
There was a problem hiding this comment.
You can drop the aarch64-darwin condition above, since stdenv.isAarch64 will also catch that.
…endency. GHC HQ switched the musl bindists from gmp to `integer-simple` with GHC >= 8.10.6, but this was not reflected in the nixpkgs update: * commit 6f12424: ghc: 8.10.5-binary -> 8.10.7-binary From PR NixOS#135453 See also NixOS#130441.
When debugging musl builds, I often have to sift through thousands of lines of `nix-store -q --tree` or `nix-store -qR` output. Until now, `pkgsMusl` and normal `pkgs` GHCs looked exactly the same in there, making that task tough. Same for `integer-simple`, which makes debugging `gmp` issues easier. This commit introduces a suffix to tell them apart easily. Note that this is different from `targetPrefix` which is for cross-compilation, which `pkgsMusl` does not do.
bc5a969 to
8ec92c5
Compare
|
Closing in favour of these PRs that include all these changes, rebased: |
Motivation for this change
musl+integer-simplecombination unbroken (was marked as broken in PR ghc: mark broken for musl + integer-simple builds #130441).gmp, but was built againstinteger-simpleitself.namefor all GHCs so that you can tell whether it's a-musland/or-integer-simplevariant, making inspection withnix-store -q --treemuch easier, and copy-pasted nix error messages more obvious (you know which GHC variant failed to build).Things done
sandbox = trueset innix.conf? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"./result/bin/)TODO
if stdenv.isAarch64 || stdenv.isAarch32blocks as well, and I cannot test those, so somebody else needs to help with that.