!RbXGJhHMsnQcNIDFWN:nixos.org

Haskell in Nixpkgs/NixOS

725 Members
For discussions and questions about Haskell with Nix, cabal2nix and haskellPackages in nixpkgs | Current Docs: https://haskell4nix.readthedocs.io/ | More Nix: #community:nixos.org | More Haskell: #haskell-space:matrix.org145 Servers

Load older messages


SenderMessageTime
1 Apr 2025
@qyliss:fairydust.spaceAlyssa Ross
In reply to @alex:tunstall.xyz

Have you tried getting it through pkgsMusl?

IIRC pkgsMusl is cross-compiled from the glibc bootstrap, but that should work even for GHC nowadays.

That's what I'm doing. It is not cross compiled.
07:09:44
@a12l:matrix.orga12l Alex: It works now! Thanks for the help! 07:26:50
@qyliss:fairydust.spaceAlyssa RossIt natively bootstraps from a GHC-provided binary, but for 9.2.4 (current bootstrap) compiler, that's only available for x86_64: nixpkgs/08:30:30
@qyliss:fairydust.spaceAlyssa Ross * 08:30:39
@Las:matrix.orgLasWhat's the "canonical" way of applying an overlay to all haskell packages? Can't seem to find it in the manual, and I think what I did back in the day was do it manually for the specific haskell packages I was using.18:36:19
@Las:matrix.orgLascanonical -> idiomatic18:36:32
@srk:matrix.distrap.orgsrk ⚡️Something like this? https://github.com/HaskellEmbedded/ivory-tower-nix/blob/main/nix/env.nix#L6-L11 19:20:20
@Las:matrix.orgLas
In reply to @srk:matrix.distrap.org
Something like this? https://github.com/HaskellEmbedded/ivory-tower-nix/blob/main/nix/env.nix#L6-L11
But that doesn’t apply to all of them
19:21:38
@srk:matrix.distrap.orgsrk ⚡️ It does as it overrides mkDerivation of the package set 19:23:18
@Las:matrix.orgLas srk ⚡️: I think my original message was ambiguous. I mean applying it to all haskellPackages's 22:52:40
@Las:matrix.orgLas* What's the "canonical" way of applying an overlay to all haskellPackages's? Can't seem to find it in the manual, and I think what I did back in the day was do it manually for the specific haskellPackages's I was using.22:53:02
2 Apr 2025
@sternenseemann:systemli.orgsterni (he/him) Alyssa Ross: It's unfortunately uncharted territory at the moment. The only way to bootstrap GHC is via a suitable bindist, so if one is available, it's easy. (bootstrappable builds of GHC have, to my knowledge, not left the theory crafting stage and I highly doubt that current ideas (hugs and -fvia-C) will ever be practical due to the incredibly long ensuing chain.) We have entertained the notion that we could build cross compiled bindists (or something equivalent, nixpkgs specific) and upload the result to tarballs.nixos.org to start a new bootstrap chain, but this is also only a concept at the moment. We can cross compile GHC < 9.6, so it should be possible to get an aarch64-musl GHC from nixpkgs in theory, but no infrastructure exists for anything beyond. 00:54:13
@sternenseemann:systemli.orgsterni (he/him)I've never tried building a bindist using the GHC make build system (i.e. < 9.6) which would be interesting for this purpose since we could just have a job for it and repackage the result (after tarballs.nixos.org plumbing, probably).00:55:06
@sternenseemann:systemli.orgsterni (he/him)amjoseph attempted to repackage a debian GHC package and said that it was very difficult to patchelf it to a point where it would work and abandoned the project (at the time, he was trying to get a ppc64le bootstrap compiler out of it, iirc). 00:56:07
@sternenseemann:systemli.orgsterni (he/him)“ideally relatively soon” – probably difficult00:56:46
@sternenseemann:systemli.orgsterni (he/him)though we should pursue a solution like this soon since it more or less hinges on the build system that GHC has dropped for >= 9.6; with the new one we haven't been able to cross compile GHC yet (and it looks to be very difficult).00:58:08
@sternenseemann:systemli.orgsterni (he/him)(maybe this is easier to discuss in a more long form format?)00:59:06
@qyliss:fairydust.spaceAlyssa Ross
In reply to @sternenseemann:systemli.org
Alyssa Ross: It's unfortunately uncharted territory at the moment. The only way to bootstrap GHC is via a suitable bindist, so if one is available, it's easy. (bootstrappable builds of GHC have, to my knowledge, not left the theory crafting stage and I highly doubt that current ideas (hugs and -fvia-C) will ever be practical due to the incredibly long ensuing chain.) We have entertained the notion that we could build cross compiled bindists (or something equivalent, nixpkgs specific) and upload the result to tarballs.nixos.org to start a new bootstrap chain, but this is also only a concept at the moment. We can cross compile GHC < 9.6, so it should be possible to get an aarch64-musl GHC from nixpkgs in theory, but no infrastructure exists for anything beyond.
There is a bindist for 9.8+
06:45:46
@qyliss:fairydust.spaceAlyssa RossSo I'd been wondering if I could just use that as the bootstrap for the current default GHC06:49:09
@cdepillabout:matrix.orgcdepillabout Maybe what you're thinking of is packageOverrides: https://haskell4nix.readthedocs.io/frequently-asked-questions.html#how-to-override-packages-in-all-compiler-specific-package-sets 07:47:06
@sternenseemann:systemli.orgsterni (he/him) Alyssa Ross: GHC supports being bootstrapped with the two major versions before it officially (so 9.8 can bootstrap 9.10 and 9.12). Self bootstrapping often works though it probably requires some tinkering. It's probably worth investigating whether 9.8 can bootstrap 9.8 since we're currently upgrading to that version. 09:18:28
@qyliss:fairydust.spaceAlyssa RossI will investigate that then, thanks.09:21:56
@me:linj.techlinj Any ideas to unbreak cabal-add? 13:58:11
@me:linj.techlinj * Any ideas to unbreak cabal-add? It is a dependency of HLS 2.10.0.0. 14:02:23
@me:linj.techlinj * Any ideas how to unbreak cabal-add? It is a dependency of HLS 2.10.0.0. 14:03:15
@alexfmpe:matrix.orgalexfmpeDidn't I fix this?15:38:10
@alexfmpe:matrix.orgalexfmpehttps://github.com/NixOS/nixpkgs/pull/39533915:39:10
@maralorn:maralorn.demaralornRedacted or Malformed Event15:48:17
@hellwolf:matrix.orghellwolfI made my project work with 9.12.1. Gonna pin my nix flake lockfile to the current branch :D17:07:49
@hellwolf:matrix.orghellwolf* I made my project work with 9.12.1. Gonna pin my nix flake lockfile to the current haskell-updates branch :D17:07:55

Show newer messages


Back to Room ListRoom Version: 6