!RbXGJhHMsnQcNIDFWN:nixos.org

Haskell in Nixpkgs/NixOS

721 Members
For discussions and questions about Haskell with Nix, cabal2nix and haskellPackages in nixpkgs | Current Docs: https://haskell4nix.readthedocs.io/145 Servers

Load older messages


SenderMessageTime
31 Mar 2025
@maralorn:maralorn.demaralornCan you do an ls on the output of the derivation?20:51:10
@alex:tunstall.xyzAlex
In reply to @a12l:matrix.org
Doesn't seem that HLS for 9.2 is available in my $PATH?
nix-repl> haskell.compiler.ghc92.version
"9.2.8"

This is probably why. You need "927" in the supportedGhcVersions.

21:29:12
@a12l:matrix.orga12l maralorn, Alex It seems that haskell-language-server-9.2.8 is in my $PATH when I try to autocomplete in the terminal. 21:58:21
@a12l:matrix.orga12l May be that. But why do I need to specify 927? Why doesn't 928 show up when I run haskell-language-server-wrapper when 966 shows up? 21:59:56
@alex:tunstall.xyzAlex
In reply to @qyliss:fairydust.space
@sternenseemann:systemli.org what would be my route to getting GHC on aarch64 musl in Nixpkgs, ideally relatively soon? They have binaries for 6.8 but nothing older, and my previous strategy of just avoiding anything with a pandoc input is getting more and more difficult.

Have you tried getting it through pkgsMusl?

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

22:00:52
@alex:tunstall.xyzAlex
In reply to @a12l:matrix.org
May be that. But why do I need to specify 927? Why doesn't 928 show up when I run haskell-language-server-wrapper when 966 shows up?
Because 92 means "the latest available revision of 9.2" and that happens to be 9.2.8, not 9.2.7.
For 96, 9.6.6 is the latest revision in Nixpkgs so that's what you get.
22:02:24
@a12l:matrix.orga12l I understand why you get 9.2.8 when you specify 92, but why does 9.6.6 show up when running haskell-language-server-wrapper and not 9.2.8? In that project 9.2.8 is more correct that 9.6.6 22:05:22
@alex:tunstall.xyzAlex I don't think it's chosen to use either version?
HLS needs the exact same version as the compiler, so the wrapper gave up altogether when it failed to find a HLS for 9.2.7.
22:06:51
@alex:tunstall.xyzAlex * I don't think it has chosen to use either version?
HLS needs the exact same version as the compiler, so the wrapper gave up altogether when it failed to find a HLS for 9.2.7.
22:06:58
1 Apr 2025
@lowtex:matrix.org_low_ joined the room.00:19:59
@lowtex:matrix.org_low_Hey, I'm using NixOS & Cabal & GHC 9.12.1. I want to utilize hmatrix-gls (0.19.0.1). But cabal new-build all --preference="Cabal >= 3.14.1.1" --keep-going --enable-debug-info=3 inside of nix develop --impure --expr 'with import <nixpkgs> {}; mkShell rec { buildInputs = [pkg-config zlib blas lapack gsl]; LD_LIBRARY_PATH = lib.makeLibraryPath buildInputs;}' leads to <no location info>: error: …/libgsl.so: undefined symbol: cblas_ctrmv. Any idea? Thx in advance!00:52:19
@lowtex:matrix.org_low_ Among other things, I've tried to (1) utilize openblas instead of blas and to (2) link dynamically by shared: True↵executable-dynamic: True. 00:52:56
@lowtex:matrix.org_low_ set a profile picture.00:57:46
@lowtex:matrix.org_low_ changed their profile picture.01:03:16
@lowtex:matrix.org_low_ changed their display name from lowtex to low.01:03:44
@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

Show newer messages


Back to Room ListRoom Version: 6