Haskell in Nixpkgs/NixOS | 704 Members | |
| For discussions and questions about Haskell with Nix, cabal2nix and haskellPackages in nixpkgs | Current Docs: https://haskell4nix.readthedocs.io/ | 142 Servers |
| Sender | Message | Time |
|---|---|---|
| 5 Apr 2025 | ||
| but when you rebuild core parts of the toolchain, you need to do the bootstrap all over again | 09:20:58 | |
In reply to @divyaranjan:matrix.org@alex:tunstall.xyz has done some work | 09:22:47 | |
In reply to @emilazy:matrix.orgwouldn't you freeze the bootstrapped one to a git commit and never touch it again? | 09:27:09 | |
| let's say you build GHC 4 with Hugs compiled with GCC 14 | 09:27:42 | |
| * wouldn't you freeze the bootstrapped one to a git commit (of guix pkg? or nixpkgs) and never touch it again? | 09:28:04 | |
| then when you bump GCC to 15, you need to build GHC 4 with Hugs compiled with GCC 15 | 09:28:08 | |
ca-derivations would allow short-circuiting once you get to a bit-identical binary output, but that might never happen, e.g., because glibc store path changed | 09:28:10 | |
| i see. i can see running old bin in a new container as a workaround | 09:29:19 | |
In reply to @emilazy:matrix.orgOr, you just have Hugs be built with GCC 14? We always have multiple versions of GCC around. | 09:30:13 | |
ok, but GCC 14 itself changed because glibc got updated | 09:31:08 | |
| it's true that you could pin an entire separate copy of Nixpkgs (and pay the evaluation cost for an entire separate package tree for everything that uses GHC, and then that multiplies because there are multiple bootstraped packages, etc.) | 09:31:34 | |
| at that point you're also multiplying the amount of source that needs to be trusted for the bootstrap too though | 09:31:51 | |
and the compiler might have bugs on a certain architecture, or glibc with a new kernel, …, so you do not actually want to pin those things forever for the same reason you want to upgrade packages in general | 09:32:14 | |
| Not sure about how it happens in Nixpkgs, but it's common in Guix to have it this way. The package tree gets evaluated only when built. I can create a package tree separate for GHC 9.2 to 9.12 without the previous package tree being affected. And if you need to change something later, you can always keep the older one separately in another package for that package tree. Maintenance is relatively easier. | 09:36:53 | |
| So GHC 9.2 will link to whatever glibc was current back then forever? Or does this rely on grafting? | 09:37:56 | |
In reply to @divyaranjan:matrix.org I don't think anybody's trying to boot from GHC 4's One problem with the idea of building ancient GHC versions is that Nixpkgs prefers not to maintain equally old compatible compilers and libraries, so it may be a struggle to get it to work with the GCC versions we have available. | 10:28:27 | |
In reply to @toonn:matrix.orgWe do have grafts, yes. | 10:34:30 | |
| Thanks!! I'll properly review it soon. | 11:51:37 | |
| With GHC there are probably more pressing issues at the moment, i.e. all the regressions from the Hadrian build system, figuring out how to bootstrap new platforms independently from GHC upstream etc. | 11:55:41 | |
| bootstrapable GHC is impractical even if feasible because it would currently involve an insanely long bootstrap chain which is not workable with the build time we have available; also it would involve dealing with ancient LLVM versions at the very least for e.g. aarch64 | 11:57:28 | |
| Divya: what problems are you running into with hadrian? We are basically treating it as a normal haskell tool, building it using the bindist we also use to bootstrap GHC and reusing our normal Haskell package set, this requires occasional fiddling with version constraints, but Hadrian is not too picky about dependency versions. | 11:59:30 | |
| so basically we completely ignore the bootstrap plan thing upstream provides | 11:59:46 | |
| you may be interested in https://github.com/stable-haskell/ghc/pull/3 for a future improvement; even some GHC devs are not happy with hadrian | 12:00:44 | |
In reply to @sternenseemann:systemli.orgThank you!! It's blocking me from updating Nixpkgs ATM so I hope it can be ready soon, but ofc if it ends up stuck for reasons outside of my control I can work around with an overlay or something | 13:10:37 | |
| do we have hls 9.10 packaged somewhere? | 13:37:48 | |
| or otherwise, what are the current options for getting 9.10? | 13:45:09 | |
| We use the same hls derivation for every ghc major version. | 13:45:16 | |
oh, do we have it somewhere in haskell.compiler.ghc910? | 13:46:23 | |
| It works. You can install ghc 9.10 with HLS from nixos-unstable. | 13:46:01 | |
| That’s the ghc you want. Have a look at the nixpkgs manual to read how to install hls for that. | 13:47:42 | |