!RbXGJhHMsnQcNIDFWN:nixos.org

Haskell in Nixpkgs/NixOS

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

Load older messages


SenderMessageTime
6 May 2026
@srk:matrix.distrap.orgsrk ⚡️I have a PR fixing the sublib issue here, feedback welcome https://github.com/haskell/cabal/pull/1178814:03:31
@srk:matrix.distrap.orgsrk ⚡️* I have a PR fixing the sublib issue, feedback welcome https://github.com/haskell/cabal/pull/1178814:04:55
@alexfmpe:matrix.orgalexfmpe
In reply to @artem.types:matrix.org
so, the doctest package now provides a separate executable cabal-doctest which enjoys cabal integration via the external command interface: if you have cabal-doctest in your PATH, you can run cabal doctest, which is nice. We rely on it in Cabal development. The issue is that the cabal-doctest executable is gated by a flag. So, to install it with cabal we do something like this: cabal install doctest --flag cabal-doctest. Is there an easy way to add such a flag-gated executable in my nix-shell? For sure, a simple haskellPackages.doctest won't cut it...
enableCabalFlag "cabal-doctest" super.doctest
18:09:52
@alexfmpe:matrix.orgalexfmpeSomething like that, see configuration-nix.nix or so for examples18:10:10
@artem.types:matrix.orgArtemnice, will try, thank you18:10:28
@artem.types:matrix.orgArtem alexfmpe: in a standalone shell.nix, how do i get to that haskellLib that seems to define enableCabalFlag? 18:18:37
@artem.types:matrix.orgArtem
  doctest = pkgs.haskell.lib.enableCabalFlag "cabal-doctest" super.doctest;

seems to go further but fails with "error: expected a set but found a string: "cabal-doctest"" while the examples in haskellPackages do use strings there (e.g. https://github.com/NixOS/nixpkgs/blob/1345ea31ceb06f9f74417083b2ec2d4e7d911e0b/pkgs/development/haskell-modules/configuration-nix.nix#L926)

18:22:01
@alexfmpe:matrix.orgalexfmpe try flipping the arguments, that set is likely supposed to be super.doctest 18:35:57
@alexfmpe:matrix.orgalexfmpeor switch to pkgs.haskell.lib.compose18:36:05
7 May 2026
@agahnim:matrix.orgAgahnim joined the room.12:02:42
@mangoiv.:matrix.orgMangoIV what is the reason for useLLVM being off-by-default? 14:21:39
@noiobeforebedtime:winesj.comJack (he/him)Wasn’t the person who made that switch. But it takes longer to compile, and that’s GHC’s default behavior unless you use -fllvm21:28:16
@alexfmpe:matrix.orgalexfmpeI think it's also currently broken for windows, something about split sections21:45:09
@alexfmpe:matrix.orgalexfmpethere was a recent PR fixing it, dunno if anything released had it backported21:45:27
8 May 2026
@mangoiv.:matrix.orgMangoIV I mean. Enabling only on platforms that it works on would go a long way. IMO it’s just a bit weird that you need to rebuild the compiler even though LLVM is basically a runtime dependency. 09:17:04
@emilazy:matrix.orgemilyI believe it affects the config11:34:02
@emilazy:matrix.orgemilylike the settings file stuff11:36:21
@emilazy:matrix.orgemilyidk if that could be split out to a separate derivation11:36:32
@emilazy:matrix.orgemilyLLVM is pretty chunky to pull in non-optionally11:36:46
@emilazy:matrix.orgemilyconsidering stuff depending on Pandoc, ShellCheck etc. and GHC's historical problems with LLVM version support11:37:16
@emilazy:matrix.orgemilyif it could just be a wrapper rebuild to use LLVM that would be one thing11:37:57
@emilazy:matrix.orgemilyoh11:38:53
@emilazy:matrix.orgemilyhttps://github.com/NixOS/nixpkgs/blob/8554fb1b7455107dda8184fff913e601254ab527/pkgs/development/haskell-modules/with-packages-wrapper.nix11:38:56
@emilazy:matrix.orgemilypretty sure you can just override withPackages and skip the compiler build11:39:12
@emilazy:matrix.orgemilyoverriding the compiler build itself is requesting it do the actual bootstrap with LLVM I think11:39:50
@teoc:matrix.orgTeo (he/him)This would be great imo11:41:05
@emilazy:matrix.orgemilywell I think ^ is that11:49:40
@emilazy:matrix.orgemilyhttps://github.com/NixOS/nixpkgs/blob/8554fb1b7455107dda8184fff913e601254ab527/pkgs/development/haskell-modules/with-packages-wrapper.nix#L20211:50:21
@emilazy:matrix.orgemily I guess it basically just adds it to the path and doesn't even add -fllvm itself? 11:51:44
@dandart:matrix.orgEmber changed their display name from Ember Void to Ember.15:21:36

Show newer messages


Back to Room ListRoom Version: 6