!RbXGJhHMsnQcNIDFWN:nixos.org

Haskell in Nixpkgs/NixOS

695 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.org141 Servers

Load older messages


SenderMessageTime
19 Jun 2025
@maralorn:maralorn.demaralorn
In reply to @setunset:matrix.org
Thanks. But how large is th delta ?How many versions I can expect to be available when they are not yet released to the unstable branch?
I am unsure what you mean. Do you wonder how many less haskell packages build on the non default ghc? Hard to say.
07:22:35
@maralorn:maralorn.demaralornBut we have all recent ghc versions packaged including 9.12.07:23:33
@maralorn:maralorn.demaralornThey are all "released" in the sense that they exist on nixos-stable. They just are not yet defaults.07:24:42
@alexfmpe:matrix.orgalexfmpea lot of packages build with 9.12 out of nixpkgs notably, both HLS and reflex-dom do and they have massive dependency footprints08:15:49
@alexfmpe:matrix.orgalexfmpealso, while the compiler is cached, the package set itself isn't, so the first build will be annoying08:16:08
@setunset:matrix.orgFreeVariable
In reply to @alexfmpe:matrix.org
also, while the compiler is cached, the package set itself isn't, so the first build will be annoying
Makes sense. Thanks!
12:22:43
@lenny:flipdot.orgLenny. changed their display name from Lenny. to Lenny. [9731 DECT].12:48:54
@ashinnv:matrix.orgMagnolia Mayhem changed their display name from Magnolia Mayhem: Rallycar Mailman to Magnolia Mayhem.14:23:45
20 Jun 2025
@m1-s:matrix.orgm1-s

I am getting these compiler errors on aarch64-darwin after upgrading to ghc 9.8.4

       > /private/tmp/nix-build-my-package-0.0.0.drv-2/ghc39648_0/ghc_2167.s:8135994:2: error:
       >      error: fixup value out of range
       >             cbnz x17, Lc3HV0l
       >             ^
       >         |
       > 8135994 |         cbnz x17, Lc3HV0l
       >         |  ^
       >
       > /private/tmp/nix-build-my-package-0.0.0.drv-2/ghc39648_0/ghc_2167.s:8136336:2: error:
       >      error: fixup value out of range
       >             b.hi Lc3HV1y
       >             ^
       >         |
       > 8136336 |         b.hi Lc3HV1y
       >         |  ^
       >
       > <no location info>: error:
       >     `cc' failed in phase `Assembler'. (Exit code: 1)

It compiles on x86-linux. Anyone seen this before?

22:13:43
21 Jun 2025
@sternenseemann:systemli.orgsterni (he/him)Looks like https://gitlab.haskell.org/ghc/ghc/-/issues/23746, but should be fixed in 9.8.4 iirc11:05:12
22 Jun 2025
@setunset:matrix.orgFreeVariableYou should really ask questions like this in the Haskell nixpkgs channel.09:39:48
@setunset:matrix.orgFreeVariable

maralorn Okay, so be it

{
  inputs = {
    nixpkgs.url = "https://github.com/NixOS/nixpkgs/archive/08f2208.tar.gz";
    flake-utils.url = "github:numtide/flake-utils";
    haskell-updates.url = "github:NixOS/nixpkgs/haskell-updates";
  };
  outputs = { self, nixpkgs, haskell-updates, flake-utils }:
    flake-utils.lib.eachDefaultSystem (system:
      let
        pkgs = import nixpkgs {
            inherit system;
            overlays = [
                (final: prev: {
                    haskell-language-server =
                        haskell-updates.legacyPackages.${system}.haskellPackages.haskell-language-server;
                })
            ];
        };
      in
      {
        devShell = pkgs.mkShell {
          buildInputs = with pkgs; [
            stack
            haskell.compiler.ghc9102
            (haskell-language-server.override { supportedGhcVersions = [ "9102" ];})
            haskellPackages.fourmolu
            haskellPackages.hoogle
            zlib
          ];
          NIX_LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath [
            pkgs.stdenv.cc.cc
            pkgs.openssl
            pkgs.zlib
          ];
          NIX_LD = pkgs.lib.fileContents "${pkgs.stdenv.cc}/nix-support/dynamic-linker";
        };
      }
    );
}

>   error: function 'anonymous lambda' called with unexpected argument 'supportedGhcVersions'
09:41:18
@setunset:matrix.orgFreeVariable *

maralorn Okay, so be it

{
  inputs = {
    nixpkgs.url = "https://github.com/NixOS/nixpkgs/archive/08f2208.tar.gz";
    flake-utils.url = "github:numtide/flake-utils";
    haskell-updates.url = "github:NixOS/nixpkgs/haskell-updates";
  };
  outputs = { self, nixpkgs, haskell-updates, flake-utils }:
    flake-utils.lib.eachDefaultSystem (system:
      let
        pkgs = import nixpkgs {
            inherit system;
            overlays = [
                (final: prev: {
                    haskell-language-server =
                        haskell-updates.legacyPackages.${system}.haskellPackages.haskell-language-server;
                })
            ];
        };
      in
      {
        devShell = pkgs.mkShell {
          buildInputs = with pkgs; [
            stack
            haskell.compiler.ghc9102
            (haskell-language-server.override { supportedGhcVersions = [ "9102" ];})
            haskellPackages.fourmolu
            haskellPackages.hoogle
            zlib
          ];
          NIX_LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath [
            pkgs.stdenv.cc.cc
            pkgs.openssl
            pkgs.zlib
          ];
          NIX_LD = pkgs.lib.fileContents "${pkgs.stdenv.cc}/nix-support/dynamic-linker";
        };
      }
    );
}

error: function 'anonymous lambda' called with unexpected argument 'supportedGhcVersions'

09:42:01
@root:sandwitch.devSand Witch
In reply to @setunset:matrix.org

maralorn Okay, so be it

{
  inputs = {
    nixpkgs.url = "https://github.com/NixOS/nixpkgs/archive/08f2208.tar.gz";
    flake-utils.url = "github:numtide/flake-utils";
    haskell-updates.url = "github:NixOS/nixpkgs/haskell-updates";
  };
  outputs = { self, nixpkgs, haskell-updates, flake-utils }:
    flake-utils.lib.eachDefaultSystem (system:
      let
        pkgs = import nixpkgs {
            inherit system;
            overlays = [
                (final: prev: {
                    haskell-language-server =
                        haskell-updates.legacyPackages.${system}.haskellPackages.haskell-language-server;
                })
            ];
        };
      in
      {
        devShell = pkgs.mkShell {
          buildInputs = with pkgs; [
            stack
            haskell.compiler.ghc9102
            (haskell-language-server.override { supportedGhcVersions = [ "9102" ];})
            haskellPackages.fourmolu
            haskellPackages.hoogle
            zlib
          ];
          NIX_LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath [
            pkgs.stdenv.cc.cc
            pkgs.openssl
            pkgs.zlib
          ];
          NIX_LD = pkgs.lib.fileContents "${pkgs.stdenv.cc}/nix-support/dynamic-linker";
        };
      }
    );
}

>   error: function 'anonymous lambda' called with unexpected argument 'supportedGhcVersions'

You should use haskell-language-server from a different haskellPackages

Instead of using top-level haskell-language-server, consider haskell.packages.ghc9102.haskell-language-server

09:42:37
@maralorn:maralorn.demaralornNot really09:42:53
@root:sandwitch.devSand Witch

haskellPackages.fourmolu

BTW, fourmolu will not work with a new syntax too

09:43:52
@setunset:matrix.orgFreeVariableI mean, HLS is indeed the 2.11 version as I want. It's just the wrong built (ghc 9.8.4 when I want ghc 9.10.2)09:44:07
@maralorn:maralorn.demaralornThe top level hls would also work with the supported versions override, but here you are using the haskell-language-server from haskellPackages which does not have that override09:44:30
@maralorn:maralorn.demaralorn But @root:sandwitch.dev solution also works 09:44:55
@maralorn:maralorn.demaralorn @setunset:matrix.org you might also consider using haskellPackages.shellFor, it e.g. has a hoogle option 09:46:02
@root:sandwitch.devSand Witchs/haskellPackages/haskell.packages.ghc910209:46:55
@root:sandwitch.devSand WitchhaskellPackages correspond to a haskell.packages.ghcXYZ where XYZ is a current stackage LTS, I guess09:48:44
@root:sandwitch.devSand Witch* haskellPackages corresponds to a haskell.packages.ghcXYZ where XYZ is a current stackage LTS, I guess09:49:06
@setunset:matrix.orgFreeVariable Thank you very much maralorn and Sand Witch . It's building. Fingers crossed 09:49:47
@lambdatheultimatealias:matrix.orglambdatheultimatealiasQuick question. When the scripts run to update packages from Hackage, do they take the latest uploaded to Hackage or the latest that build from Hackage? I'm asking because my package depends on Amazonka which works on Nix but is out of date on Hackage, causing builds to fail there.15:36:51
@maralorn:maralorn.demaralornLatest uploaded15:37:43
@toonn:matrix.orgtoonn It's a Stackage LTS and then Hackage for everything else, to be more precise, no? 15:38:54
@maralorn:maralorn.demaralorn
In reply to @toonn:matrix.org
It's a Stackage LTS and then Hackage for everything else, to be more precise, no?
Yes, as described in the nixpkgs manual. Although it could possibly be more precise on the former question
15:45:34
@le:4d2.orglevin joined the room.18:36:28
23 Jun 2025
@sternenseemann:systemli.orgsterni (he/him) lambdatheultimatealias: note that you can't draw any conclusions from nixpkgs about hackage since we regularly apply patches, modify constraints, build flags, test flags etc. 21:14:04

Show newer messages


Back to Room ListRoom Version: 6