!RbXGJhHMsnQcNIDFWN:nixos.org

Haskell in Nixpkgs/NixOS

691 Members
For discussions and questions about Haskell with Nix, cabal2nix and haskellPackages in nixpkgs | Current Docs: https://nixos.org/manual/nixpkgs/unstable/#haskell | Current PR: https://github.com/nixos/nixpkgs/pulls?q=is%3Apr+is%3Aopen+head%3Ahaskell-updates | Maintainer Docs: https://github.com/NixOS/nixpkgs/blob/haskell-updates/pkgs/development/haskell-modules/HACKING.md | More Nix: #community:nixos.org | More Haskell: #haskell-space:matrix.org | Merger Schedule: https://cloud.maralorn.de/apps/calendar/p/H6migHmKX7xHoTFa/dayGridMonth/now | Join #haskell.nix:libera.chat for question about the alternative haskell.nix infrastructure137 Servers

Load older messages


SenderMessageTime
9 Jan 2026
@sternenseemann:systemli.orgsterni ners: it would already be helpful if you could open an issue for the problem and obtain the contents of config.log (written by autoconf). You can get that by building witih --keep-failed. 15:31:18
@sternenseemann:systemli.orgsternialso link this piece of information, please: https://github.com/NixOS/nixpkgs/pull/466258#issuecomment-365107341615:32:43
@artem.types:matrix.orgArtem

i'm trying to build simple liquidhaskell app (https://github.com/ulysses4ever/liquid-haskell-demo) with

# default.nix
(pkgs.haskellPackages.callCabal2nix "liquid-haskell-app" ./liquid-haskell-app {}).overrideAttrs (old: {
  nativeBuildInputs = (old.nativeBuildInputs or []) ++ [ pkgs.z3 ];
})

when I run nix-build I see that the builder runs haddock, which conflicts with liquid haskell (). I tried adding doHaddock = false; in the overrideAttrs but that didn't change a thing. What am I missing to turn off Haddock?

18:35:48
@sternenseemann:systemli.orgsterniyou need to use the override interface of the haskell builder, not overrideAttrs18:36:22
@sternenseemann:systemli.orgsternii.e. haskell.lib.compose.overrideCabal18:36:28
@andromeda:tchncs.deandromeda
In reply to @sternenseemann:systemli.org
ners: it would already be helpful if you could open an issue for the problem and obtain the contents of config.log (written by autoconf). You can get that by building witih --keep-failed.
most helpful thing I learned today: --keep-failed exists
19:02:01
@artem.types:matrix.orgArtem

sterni: i tried

pkgs.haskell.lib.overrideCabal (pkgs.haskellPackages.callCabal2nix "liquid-haskell-app" ./liquid-haskell-app {}) (old: {
  nativeBuildInputs = (old.nativeBuildInputs or []) ++ [ pkgs.z3 ];
  doHaddock = false;
})

but that fails with a type error:

  error: function 'anonymous lambda' called with unexpected argument 'nativeBuildInputs'
19:06:06
@sternenseemann:systemli.orgsterniThat’s expected the dependency declarations are named different there to match cabal19:06:47
@sternenseemann:systemli.orgsterni you can look it up in the nixpkgs manual under “specifying dependencies” in the haskell section 19:07:13
@artem.types:matrix.orgArtemgreat, "buildTools" worked. Thanks a lot!19:16:47
@andromeda:tchncs.deandromedaliquid haskell looks really cool19:48:59
@artem.types:matrix.orgArtem apparently, core liquid packages in nixpkgs are built without liquid annotations for the same reason: Haddock was enabled by default. So, now I need to disable it there. haskell-modules/configuration-nix.nix seems like the right place? And it should look fairly similar (oveerideCabal) I guess. 20:46:49
10 Jan 2026
@pnotequalnp:pnotequalnp.compnotequalnp joined the room.05:15:41
@jean:4ray.coJean 💕 joined the room.11:28:04
@tks_123:matrix.orgtks_123mates13:02:04
@tks_123:matrix.orgtks_123Is there a way to add a haskell package as a flake (i.e. some other haskell project with its own flake.nix) into the haskellPackages of my own haskell project?13:03:37
@tks_123:matrix.orgtks_123are there examples of this out there?13:03:45
@acidbong:envs.netAcid Bong
In reply to @tks_123:matrix.org
Is there a way to add a haskell package as a flake (i.e. some other haskell project with its own flake.nix) into the haskellPackages of my own haskell project?
yup, but i hope they expose a package.nix with the package recipe alone, so you could haskellPackages.callPackage it
13:25:26
@acidbong:envs.netAcid Bong(for the sake of using the same version and edition of GHC)13:26:01
@maralorn:maralorn.demaralornIts complicated, the default flake interface is not really meant to be composable.16:03:30
@maralorn:maralorn.demaralornSome flake authors design their flake in a way that they expose a) the package and b) an overlay which injects the package.16:04:05
@aiya:catgirl.cloudaiya joined the room.19:38:17
@aiya:catgirl.cloudaiya

so the 25.11 "default" GHC is 9.10, but LLVM only has 18-20 which is incompatible. is this intentional, or is LLVM 15 supposed to be in nixpkgs just to support 9.10 -fllvm?

i back-searched this chat for LLVM but only found conversation on bumping LLVM 12 -> 15

19:50:59
@emilazy:matrix.orgemilywe backport patches for newer LLVM support to older GHCs19:52:34
@emilazy:matrix.orgemily(there aren't that many, the backend doesn't change much since it uses the LLVM textual IR format)19:52:52
@emilazy:matrix.orgemily(mostly it's just backporting bumps to the version number it checks)19:53:02
@emilazy:matrix.orgemily see pkgs/development/compilers/ghc/common-llvm-patches.nix 19:53:14
11 Jan 2026
@ivank:matrix.orgivan joined the room.01:54:59
@mequbic:matrix.orgiqubic (she/her) What should I do if Nix is refusing to build a Haskell Library for me? Right now, hip is failing to build! https://hackage.haskell.org/package/hip 03:30:09
@mequbic:matrix.orgiqubic (she/her)
error: Package ‘hip-1.5.6.0’ in /nix/store/aqhcr0kv7d91rfm0ca77rbakjk5gkbq6-source/pkgs/development/haskell-modules/hackage-packages.nix:330406 is marked as broken, refusing to evaluate.

       a) To temporarily allow broken packages, you can use an environment variable
          for a single invocation of the nix tools.

            $ export NIXPKGS_ALLOW_BROKEN=1

          Note: When using `nix shell`, `nix build`, `nix develop`, etc with a flake,
                then pass `--impure` in order to allow use of environment variables.

       b) For `nixos-rebuild` you can set
         { nixpkgs.config.allowBroken = true; }
       in configuration.nix to override this.

       c) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
         { allowBroken = true; }
       to ~/.config/nixpkgs/config.nix.


       note: trace involved the following derivations:
       derivation 'mh26'
03:36:54

There are no newer messages yet.


Back to Room ListRoom Version: 6