!RbXGJhHMsnQcNIDFWN:nixos.org

Haskell in Nixpkgs/NixOS

739 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.org148 Servers

Load older messages


SenderMessageTime
20 Mar 2026
@alex:tunstall.xyzAlex I noticed that GHC considers it important enough to mention whether the RTS linker exists in --info, so I'm leaning more and more in favour of adding it to passthru. 00:33:50
@woobilicious:matrix.orgwoobiliciousI'm thinking about writing a vulkan overlay to do smart frame rate limiting, convince me to do it in Haskell instead of rust...01:18:22
@woobilicious:matrix.orgwoobiliciousI want to do it in Haskell, but that feels completely irrational, the GC is going to be more of a pain than a benefit, and I don't think I need any advanced typing features.01:21:54
@noiobeforebedtime:winesj.comJack (he/him)I think it’ll depend a lot more on the quality of the Vulkan bindings than the GC.02:40:48
@noiobeforebedtime:winesj.comJack (he/him)There’s a variety of GC knobs you can turn, including turning it off for a hot path, which is what high frequency trading shops do with GC languages.02:42:17
@woobilicious:matrix.orgwoobiliciousWell that's what I mean by pain, not something to worry about in Rust. But you also have a point about bindings.03:05:20
@alex:tunstall.xyzAlex

It is also possible (but difficult) to write allocation-free code.
The GC cannot trigger when the code doesn't allocate.

I have no idea how you would regression test this approach.

04:25:06
@woobilicious:matrix.orgwoobilicious

Hmm, this seems non-trivial to resolve

 error: /nix/store/8nvri8brvdbng3pkcrycik9b8na9jsyb-ghc-9.10.3-with-packages/lib/ghc-9.10.3/lib/../lib/x86_64-linux-ghc-9.10.3/rts-1.0.2/libHSrts-1.0.2.a(AutoApply.o): requires unsupported dynamic reloc 11; recompile with -fPIC
07:14:25
@woobilicious:matrix.orgwoobilicious okay so removing options: standalone fixed it but that might be undesirable for packaging, I guess no biggie for now 07:19:06
@alexfmpe:matrix.orgalexfmpe
$ nix-build -A pkgsCross.riscv64.haskell.packages.ghc912.th-orphans
/nix/store/cd58fv3lh6jplfszy2kq0w3i0pv517gq-th-orphans-riscv64-unknown-linux-gnu-0.13.17
08:14:31
@alexfmpe:matrix.orgalexfmpe *

On your PR

$ nix-build -A pkgsCross.riscv64.haskell.packages.ghc912.th-orphans
/nix/store/cd58fv3lh6jplfszy2kq0w3i0pv517gq-th-orphans-riscv64-unknown-linux-gnu-0.13.17
08:14:48
@alexfmpe:matrix.orgalexfmpenon-TH also works for loongarch09:01:21
@alexfmpe:matrix.orgalexfmpeI've seen different libffi errors elsewhere, will try to reproduce tomorrow and check against this09:02:09
@sternenseemann:systemli.orgsterni (he/him)
In reply to @alex:tunstall.xyz

Of course, then it is necessary to manually add the required paths to the package db after installation.

sterni would you happen to know how to do that, given that you mentioned it?
If not, I will spend some time figuring it out.
I tried your suggestion, and it is indeed in need of something extra for libffi to make the compiler fully functional.

ld.gold: error: cannot find -lffi

It looks like libffi is already in depsTargetTargetPropagated, so I don't understand why it's not made available in package builds.

you sed it in after library-dirs and include-dirs I can find you an example later
09:45:53
@alex:tunstall.xyzAlex

I have it in both library-dirs and include-dirs for rts-*.conf yet GHC seems to not even try to link libffi.
I'm looking at the output with vendored libffi and I can't see where it's getting linked, so there's no way to take inspiration from there.

I could try adding -lffi to the ld-options. Is this approach sane?

22:41:52
@alexfmpe:matrix.orgalexfmpekeep in mind next ghc release will handle libffi differently23:19:42
@alexfmpe:matrix.orgalexfmpehttps://gitlab.haskell.org/ghc/ghc/-/merge_requests/1499623:19:44
@alex:tunstall.xyzAlex

Adding -lffi did not work. Somehow none of the library-dirs in rts-*.conf seem to be used; Haskell package builds fail with "error: cannot find -lffi".

It's no surprise that they're changing the libffi handling soon, this is difficult to hack around.

23:59:52
21 Mar 2026
@alexfmpe:matrix.orgalexfmpeI did PR a bump to ghcHEAD precisely to see if it affected the cross libffi shenanigans00:24:50
@alexfmpe:matrix.orgalexfmpebut iserv-proxy doesn't build with it yet00:25:07
@alexfmpe:matrix.orgalexfmpemaybe we just merge your PR as is and revisit when we can test cross on 10.0?00:35:21
@alexfmpe:matrix.orgalexfmpe* maybe we just merge your PR as is and revisit when we can test cross properly on 10.0?00:35:37
@alexfmpe:matrix.orgalexfmpeI also have no idea how the on-demand interpreter will shake things00:35:47
20 May 2021
@grahamc:nixos.org@grahamc:nixos.org set the history visibility to "world_readable".22:10:58
@grahamc:nixos.org@grahamc:nixos.org changed the room name to "" from "".22:10:58
@grahamc:nixos.org@grahamc:nixos.org invited @maralorn:maralorn.demaralorn.22:11:05
@maralorn:maralorn.demaralorn joined the room.22:11:13
@andi:kack.itandi- joined the room.22:30:49
@grahamc:nixos.org@grahamc:nixos.orgchanged room power levels.22:36:42
Room Avatar Renderer.22:46:20

Show newer messages


Back to Room ListRoom Version: 6