!RbXGJhHMsnQcNIDFWN:nixos.org

Haskell in Nixpkgs/NixOS

729 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.org146 Servers

Load older messages


SenderMessageTime
7 Jan 2026
@maralorn:maralorn.demaralorn Acid Bong: The problem is that the packages field in shellFor is not for listing dependencies but for listing the packages you want to be able to build within your shell. 18:40:11
@acidbong:envs.netAcid Bong ah, so a regular mkShell with ghc.withPackages in it is enough? 20:28:08
@maralorn:maralorn.demaralornThat would probably work, yes.20:29:20
@acidbong:envs.netAcid Bong bloo-dy-hell, that was so easy 🤦‍♂️ looks like the shellFor docs are misleading 20:33:57
@maralorn:maralorn.demaralornThere are many ways to hold this. Surprisingly many of them work but still most don’t. 😄20:37:03
8 Jan 2026
@acidbong:envs.netAcid Bong i wanna file a ticket about ghc.withPackages ignoring installDocumentation = false, but(1) there already exists one, but(2) the author mistook it for a NixOS issue (it's 316768). should we reformat the issue or open a new one? 20:12:50
9 Jan 2026
@sternenseemann:systemli.orgsterni (he/him)It got broken by a recent emscripten update again, just needs someone to look at config.log for ghc and see what goes wrong15:27:25
@sternenseemann:systemli.orgsterni (he/him)This will be addressed by https://github.com/NixOS/cabal2nix/pull/667. In theory we could also expand the manual exclude list in the meantime, but I think it's not really urgent at this point anymore.15:28:56
@ners:nixos.devnersI'd love to help, but don't know how.15:29:18
@sternenseemann:systemli.orgsterni (he/him) 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.orgsterni (he/him)also 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.orgsterni (he/him)you need to use the override interface of the haskell builder, not overrideAttrs18:36:22
@sternenseemann:systemli.orgsterni (he/him)i.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.orgsterni (he/him)That’s expected the dependency declarations are named different there to match cabal19:06:47
@sternenseemann:systemli.orgsterni (he/him) 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

Show newer messages


Back to Room ListRoom Version: 6