!RbXGJhHMsnQcNIDFWN:nixos.org

Haskell in Nixpkgs/NixOS

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

Load older messages


SenderMessageTime
22 Jan 2026
@acidbong:envs.netAcid Bongyou can still save that recipe and use it locally tho16:16:12
@lordmzte:mzte.deLordMZTE

I see. Surely someone must have taken over maintaining this out of tree, right?

16:17:10
@emilazy:matrix.orgemily AIUI the newer GHCJS is a native GHC backend and is accessible with pkgsCross.ghcjs or something 16:22:15
@emilazy:matrix.orgemilyit was the old GHCJS that was removed16:22:19
@acidbong:envs.netAcid Bongoh16:22:26
@acidbong:envs.netAcid Bongi can't find ghcjs in the search16:22:38
@emilazy:matrix.orgemilyit's a platform, not a package16:31:38
@maralorn:maralorn.demaralornYes, the new js backend is supported in nixpkgs.16:40:04
@alexfmpe:matrix.orgalexfmpeshellFor doesn't work for cross AFAICT, but you can whip something up manually here'ss one example: https://github.com/bfeitknecht/impli/pull/6/files17:09:00
@alexfmpe:matrix.orgalexfmpethat reminds me, I haven't checked pkgsCross.ghcjs status with 9.1417:09:46
@alexfmpe:matrix.orgalexfmpenix-build here builds everything with nix, nix-shell grabs the tools from nixpkgs then uses cabal-install for the rest, wrapping it so it uses js backend17:12:33
@alexfmpe:matrix.orgalexfmpeshellFor, were it to work here, would build all the deps with nix, so cabal-install/ghci(d) would only be used for your own project17:13:07
@lordmzte:mzte.deLordMZTE

Thanks!

18:02:56
@wolfgangwalther:matrix.org@wolfgangwalther:matrix.org left the room.19:17:01
23 Jan 2026
@lordmzte:mzte.deLordMZTE

I'm using shellFor for a devshell for my Haskell project and I want to debug a library I'm pulling in (via cabal2nix). For this, GHCi needs to run the library in interpreted mode, but using cabal repl, it's used in compiled mode and I cannot set breakpoints in it. Is there a way to also get the source code of libraries in a dev shell?

13:50:03
@maralorn:maralorn.demaralornThe best I can think of is checking that library out in a (sub-)folder and adapting your cabal.project file to use it.13:57:19
@maralorn:maralorn.demaralornI mean I guess you can try to get nix to give you a store path of the source and try to point your cabal.project file at that, but I don’t know if it works, am not aware of any tooling specific for this und wouldn’t recommend it.13:58:44
@lordmzte:mzte.deLordMZTE

Alright. Sort of unfortunate :P

14:38:10
@alexfmpe:matrix.orgalexfmpeI think that if you add both your package and that library to the packages field of shellFor, then when you run cabal repl, it will grab all the intermediate deps and throw into ghci as well. Might need to enable multi-repl16:19:31
@alexfmpe:matrix.orgalexfmpeWell actually I'm not sure if shellFor handles the sandwhich situation right16:20:41
@alexfmpe:matrix.orgalexfmpeIf it doesn't, I expect it can be fixed. I've some shitty nix that does that for obelisk projects16:21:14
@alexfmpe:matrix.orgalexfmpeContext: https://www.well-typed.com/blog/2024/07/hls-multi/#the-need-for-cabal-install-3.1216:21:51
@acidbong:envs.netAcid Bongnote that cabal-install must also be in the same Haskell closure to be able to see other libs16:52:46
24 Jan 2026
@sternenseemann:systemli.orgsterni maralorn: seems to me that we could solve the recent separate bin outputs debacle by moving the haddock docs to devdoc, so they wouldn't be installed on most people's machines. 16:21:33
@maralorn:maralorn.demaralorn sterni: What is the recent debacle? 16:37:32
@andromeda:tchncs.deandromeda
hs-rgfw> Preprocessing executable 'hs-rgfw' for hs-rgfw-0.1.0...
hs-rgfw> Building executable 'hs-rgfw' for hs-rgfw-0.1.0...
hs-rgfw> [1 of 1] Compiling Main             ( src/Main.hs, dist/build/hs-rgfw/hs-rgfw-tmp/Main.o )
hs-rgfw> [2 of 2] Linking dist/build/hs-rgfw/hs-rgfw
hs-rgfw> /nix/store/s3w5m3spa1g71hx0yb82lvk6394j3w5j-stdenv-linux/setup: line 1758: date: command not found

I'm getting the above error when running nix build on my project. I suspect it's because I'm overriding preBuild, but I don't know where to look to confirm that or how I could rectify that.

17:27:48
@maralorn:maralorn.demaralornMaybe add core-utils as a dep?17:45:44
@andromeda:tchncs.deandromedawait I might just be doing PATH wrong, lemme check17:48:31
@andromeda:tchncs.deandromedayeah shit17:48:50
@andromeda:tchncs.deandromeda I escaped the $ in PATH=${hs-bindgen-cli}/bin:$PATH 17:49:24

Show newer messages


Back to Room ListRoom Version: 6