!RbXGJhHMsnQcNIDFWN:nixos.org

Haskell in Nixpkgs/NixOS

698 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
11 Jun 2025
@maralorn:maralorn.demaralornOkay, I fixed everything but the gi-soup breakage. Still unclear to me how we can fix that.08:27:40
@maralorn:maralorn.demaralornYou were right, I accidentally disabled that by commenting out the reflex-packages overrides.10:13:17
@ners:nixos.devners

I'm trying to build a statically linked Haskell executable using pkgsStatic. If I'm understanding release-haskell.nix correctly, this derivation and all its deps should be cached: pkgsStatic.haskell.packages.native-bignum.ghc984.hello

I expect it to pull it from cache, but instead it starts building GHC from source. Am I missing something about how we cache things?

18:59:15
@maralorn:maralorn.demaralornrelease-haskell.nix applies to haskell-updates. release.nix applies to master.19:02:13
@maralorn:maralorn.demaralornDoes that help?^^19:19:38
12 Jun 2025
@root:sandwitch.devSand Witch
In reply to @ners:nixos.dev

I'm trying to build a statically linked Haskell executable using pkgsStatic. If I'm understanding release-haskell.nix correctly, this derivation and all its deps should be cached: pkgsStatic.haskell.packages.native-bignum.ghc984.hello

I expect it to pull it from cache, but instead it starts building GHC from source. Am I missing something about how we cache things?

BTW, ghc 9.6 and higher are broken on pkgsStatic: https://github.com/NixOS/nixpkgs/issues/275304
07:34:49
@ners:nixos.devners
In reply to @maralorn:maralorn.de
Does that help?^^
Yes that worked! Thank you. :)
07:43:40
@mangoiv.:matrix.orgMangoIV
In reply to @root:sandwitch.dev
BTW, ghc 9.6 and higher are broken on pkgsStatic: https://github.com/NixOS/nixpkgs/issues/275304
More specifically, the issue
is that any Hadrian-built GHC is broken, iirc
12:40:52
15 Jun 2025
@ahihi:matrix.orgpulu changed their profile picture.16:28:40
@t4ccer:matrix.orgt4ccer left the room.19:06:54
@t4ccer:matrix.orgt4ccer joined the room.19:09:04
16 Jun 2025
@matthew8:matrix.org@matthew8:matrix.org left the room.18:55:40
17 Jun 2025
@alexfmpe:matrix.orgalexfmpeRedacted or Malformed Event00:55:05
19 Jun 2025
@setunset:matrix.orgFreeVariableIs it possible to get ghc 9.10.2 on Nixos unstable?01:28:10
@setunset:matrix.orgFreeVariableThe last packaged versions seems to be 9.8.x01:28:47
@cdepillabout:matrix.orgcdepillabout GHCs are available as haskell.compiler.ghc910*, and the package sets at haskell.packages.ghc910*.lens (or whatever). Although keep in mind that sometimes things don't work with the non-default compiler. 02:46:18
@setunset:matrix.orgFreeVariable
In reply to @cdepillabout:matrix.org
GHCs are available as haskell.compiler.ghc910*, and the package sets at haskell.packages.ghc910*.lens (or whatever). Although keep in mind that sometimes things don't work with the non-default compiler.
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?
06:58:05
@setunset:matrix.orgFreeVariable* Thanks. But how large is the delta? How many versions I can expect to be available when they are not yet released to the unstable branch?06:58:27
@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

Show newer messages


Back to Room ListRoom Version: 6