ghc.v9_10_3_binary: fix the musl hash and two follow-ups to #178 - #180
Conversation
The alpine3_12 entry carried the sha256 of ghc-9.10.3-x86_64-fedora33-linux.tar.xz, the neighbouring line in upstream's SHA256SUMS, so pkgsMusl-style builds of this compiler would fail at fetch time. Nothing in corepkgs builds the musl variant, which is why it went unnoticed. The value now matches SHA256SUMS and `nix store prefetch-file` of ghc-9.10.3-x86_64-alpine3_12-linux.tar.xz; the other six hashes were checked against SHA256SUMS and are right.
The terminfo package-db fix named ncurses.v6 directly while the gmp fix next to it derives gmpUsed from the bindist's archSpecificLibraries. Do the same for ncurses, so a bindist that lists a different ncurses gets that one in terminfo's library-dirs. The rendered path is unchanged, so neither the 9.8.4 nor the 9.10.3 derivation changes.
The wrapper and recache steps spelled out x86_64-linux-ghc-9.10.3 for every Linux system, which is wrong for i686 and aarch64 (the latter gets the dir symlinked into $out/lib, so it only worked by accident). Glob the arch directory instead. On x86_64 the installed wrappers are unchanged.
|
currently working on actually having HLS be able to build with this ghc-9.10, so you might want to wait until that resolves. And thank you for this monumental effort! for ekala in general |
|
haskell-pkgs PR was quite simple: ekala-project/haskell-pkgs#4 |
|
in fable's words:
|
jonringer
left a comment
There was a problem hiding this comment.
All good, if anything, this highlights that I need to clean up ghc bootstrapping.
Hi! I'm a bit ashamed to disclose that my ghc-9.10 PR was a bit of an overstep from my fable session.
I left it running last night before going to bed because I still had fable tokens and my weekly reset was at 2 am and I didn't want to waste them so I fired a flable 5.1 max session to port a project to ekala from vanilla nix and gave it instructions to fork and work on keeping ghc-9.10, and resulted in also doing a PR with not enough review. Sorry about that, I've fixed my permission settings.
I've been evaluating the PR and reviewing it and there are a couple of mistakes and a false claim that it works with HLS. Currently working on a haskell-pkgs PR to have that claim be true.
This is fable's description of what was wrong in my runaway PR:
This PR
ghc.v9_10_3_binary: fix the x86_64 musl bindist hash— the alpine3_12 sha256 now matchesSHA256SUMSandnix store prefetch-fileof that tarball.ghc-binary: take the ncurses package from archSpecificLibraries— the terminfo fix now derivesncursesUsedthe waygmpUsedis derived, in both bindists. The rendered path is identical, so neither derivation changes (checked by comparingdrvPathbefore and after); no cache invalidation this time.ghc.v9_10_3_binary: stop hard-coding the x86_64 library directory— the twoghcLibDir=lines glob the arch directory instead. 9.10.3 only, to leave 9.8.4's derivation alone.Verified on x86_64-linux: the rebuilt 9.10.3 bindist has the same file set and byte-identical wrappers (modulo store path) as before,
passthru.tests.{hello,templateHaskell}pass,ci/eval.shevaluates all 2071 packages, nixfmt is clean. The musl fix is verified by prefetch only, since there is no musl package set to build it with.Not in this PR: HLS (haskell-pkgs, coming), and the per-version copy of the bindist file — with three copies whose diff is nine lines, a shared
mkBinaryGhc { version, hashes }ingeneric.nixwould be the next cleanup if you want it.