!RbXGJhHMsnQcNIDFWN:nixos.org

Haskell in Nixpkgs/NixOS

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

Load older messages


SenderMessageTime
2 Dec 2025
@maralorn:maralorn.demaralorn iqubic (she/her): We use ghc 9.12 at work. It’s released and working in nixpkgs. 18:29:22
@mequbic:matrix.orgiqubic (she/her) How can I switch my shell.nix to using 9.12? 18:30:07
@maralorn:maralorn.demaralornReplace all occurences of haskellPackages with haskell.packages.ghc91218:30:46
@mequbic:matrix.orgiqubic (she/her)Does it still have the HLint issue?18:59:51
@mequbic:matrix.orgiqubic (she/her)* Does HLS for 9.12 still have the HLint issue?19:01:16
@maralorn:maralorn.demaralornNo19:16:34
@mequbic:matrix.orgiqubic (she/her)Cool! I have it built it now.19:45:16
@mequbic:matrix.orgiqubic (she/her)

maralorn: One last issue:
It doesn't actually look like I have the HLS for 9.12 in this dev environment.
I'm getting this error from the Emacs LSP mode:

haskell-language-server exe candidates: ["haskell-language-server-9.12.2","haskell-language-server"]
Failed to find a HLS version for GHC 9.12.2
Executable names we failed to find: haskell-language-server-9.12.2, haskell-language-server
23:34:07
@jan:smittie.de@jan:smittie.de left the room.23:34:50
@mequbic:matrix.orgiqubic (she/her) This is true. The only HLS related executables I have in scope are haskell-language-server-9.10.3 and haskell-language-server-wrapper 23:35:03
@mequbic:matrix.orgiqubic (she/her)

Using this shell.nix:

{ pkgs ? import <nixpkgs> {} }:
let
  src = pkgs.nix-gitignore.gitignoreSource [] ./.;
  myPkg = pkgs.haskell.packages.ghc912.callCabal2nix "aoc25" src {};
in
pkgs.stdenv.mkDerivation {
  name = "aoc-shell";

  buildInputs = [
    myPkg.env.nativeBuildInputs

    pkgs.cabal-install
    pkgs.haskell-language-server
    pkgs.hlint
    pkgs.ormolu
  ];
}
23:35:33
@mequbic:matrix.orgiqubic (she/her) How can I make this work? If it's just a case of telling Emacs's lsp-mode to use a specific binary for the 9.12.2 HLS, then I can do that. However, I'm not currently seeing any relevant binaries on the $PATH 23:48:29
3 Dec 2025
@maralorn:maralorn.demaralornI works when you follow00:19:22
@maralorn:maralorn.demaralornthis00:20:04
@maralorn:maralorn.demaralornand this00:20:21
@maralorn:maralorn.demaralornliterally00:20:29
@mequbic:matrix.orgiqubic (she/her)Sorry... I missed the first thing you said... I'm a dummy! Sorry00:28:30
@iopq:matrix.orgiopq joined the room.10:56:53
@iopq:matrix.orgiopqI'm having difficulty compiling a project with another version of nixpkgs10:57:16
@iopq:matrix.orgiopqit works fine on my laptop10:57:22
@iopq:matrix.orgiopqand infinite loops on my desktop10:57:28
@iopq:matrix.orgiopqhttps://nest.pijul.com/iopq/proxy10:59:19
4 Dec 2025
@iopq:matrix.orgiopqreverting to an older nixpkgs revision fixes the issue07:47:37
@sternenseemann:systemli.orgsterni (he/him)this is not enough information to help you with your issue since we can’t guess what you are trying to do with what versions of nixpkgs what the error is10:50:02
5 Dec 2025
@magthe:tchncs.deMagnus

I'm having problems with HLS for ghc 9.10.3 in nix 25.11. It dies and prints the following on stderr:

.haskell-language-server-9.10.3-unwrapped: internal error: ARR_WORDS object (0x4243c25cd8) entered!
Stack trace:
.haskell-language-server-9.10.3-unwrapped: Failed to get stack frames of current process: No DWARF information found: Success
            0x74bfae92b970    set_initial_registers (/nix/store/6xdv0kj7ycq56l9sqip2hmxp237j78h4-ghc-9.10.3/lib/ghc-9.10.3/lib/x86_64-linux-ghc-9.10.3/libHSrts-1.0.2_thr-ghc9.10.3.so)
            0x74bfae3becd0    dwfl_thread_getframes (/nix/store/1nqqjacc6dnj61jlpgz5hk9zdjbfidbr-elfutils-0.194/lib/libdw-0.194.so)
            0x74bfae3be6eb    get_one_thread_cb (/nix/store/1nqqjacc6dnj61jlpgz5hk9zdjbfidbr-elfutils-0.194/lib/libdw-0.194.so)
            0x74bfae3bead4    dwfl_getthreads (/nix/store/1nqqjacc6dnj61jlpgz5hk9zdjbfidbr-elfutils-0.194/lib/libdw-0.194.so)
            0x74bfae3bf042    dwfl_getthread_frames (/nix/store/1nqqjacc6dnj61jlpgz5hk9zdjbfidbr-elfutils-0.194/lib/libdw-0.194.so)
            0x74bfae92c0b7    libdwGetBacktrace (/nix/store/6xdv0kj7ycq56l9sqip2hmxp237j78h4-ghc-9.10.3/lib/ghc-9.10.3/lib/x86_64-linux-ghc-9.10.3/libHSrts-1.0.2_thr-ghc9.10.3.so)
            0x74bfae935437    rtsFatalInternalErrorFn (/nix/store/6xdv0kj7ycq56l9sqip2hmxp237j78h4-ghc-9.10.3/lib/ghc-9.10.3/lib/x86_64-linux-ghc-9.10.3/libHSrts-1.0.2_thr-ghc9.10.3.so)
            0x74bfae93568f    barf (/nix/store/6xdv0kj7ycq56l9sqip2hmxp237j78h4-ghc-9.10.3/lib/ghc-9.10.3/lib/x86_64-linux-ghc-9.10.3/libHSrts-1.0.2_thr-ghc9.10.3.so)
            0x74bfae975d9b    stg_ARR_WORDS_info (/nix/store/6xdv0kj7ycq56l9sqip2hmxp237j78h4-ghc-9.10.3/lib/ghc-9.10.3/lib/x86_64-linux-ghc-9.10.3/libHSrts-1.0.2_thr-ghc9.10.3.so)

    (GHC version 9.10.3 for x86_64_unknown_linux)
    Please report this as a GHC bug:  https://www.haskell.org/ghc/reportabug

Anyone else seeing this, or able to offer some advice?

13:18:06
@teoc:matrix.orgTeo (he/him) I think this might be: https://github.com/haskell/haskell-language-server/issues/4674 13:18:59
@maralorn:maralorn.demaralorn Magnus: Yes. You need to disable the hlint plugin. And someone needs to upstream this to nixpkgs master for now. 13:20:03
@maralorn:maralorn.demaralorn Use (pkgs.haskell.lib.compose.disableCabalFlag "hlint" pkgs.haskellPackages.haskell-language-server) 13:20:50
@maralorn:maralorn.demaralorn (and for clarification, this is agreeing with and supplementing teo (they/he)s answer.) 13:21:27
@magthe:tchncs.deMagnus Ah, OK... losing hlint is a bit of a blow to the usability though :( 13:23:18

Show newer messages


Back to Room ListRoom Version: 6