!RbXGJhHMsnQcNIDFWN:nixos.org

Haskell in Nixpkgs/NixOS

728 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
25 Apr 2025
@maralorn:maralorn.demaralornMy impression is that haskell.nix is a good fit for larger projects/companies where reliably targeting many plattforms is a requirement, it is unrealistic for every team member to be well-versed in the manual dependency resolution dance of nixpkgs, caching is a non-issue because they need their own cache anyway and upstreaming is not a priority.15:20:20
@maralorn:maralorn.demaralorn* My impression is that haskell.nix is a better fit for larger projects/companies where reliably targeting many plattforms is a requirement, it is unrealistic for every team member to be well-versed in the manual dependency resolution dance of nixpkgs, caching is a non-issue because they need their own cache anyway and upstreaming is not a priority.15:20:51
@maralorn:maralorn.demaralornBut I have not actually used haskell.nix a lot.15:21:25
@toonn:matrix.orgtoonn The Nixpkgs infra makes it hard to pick versions of deps. That applies for small projects more than large projects, IMO. 15:25:28
@nrs-status:matrix.orgthirdofmay18081814goyahm I see15:39:30
@nrs-status:matrix.orgthirdofmay18081814goyalots to read and test out heheh, tyvm for comments15:39:42
@aleksana:mozilla.orgFind me at aleksana:qaq.li joined the room.15:39:50
@shapr:cofree.coffeeshaprWe used haskell.nix when I worked at SimSpace. We had one employee who spent all their time on the nix toolchain things. It was worth it!15:41:10
@shapr:cofree.coffeeshaprFor my own use, stock nixpkgs is fine 99% of the time.15:41:25
26 Apr 2025
@aleksana:mozilla.orgFind me at aleksana:qaq.liI'm trying to build our haskell ecosystem part in Nixpkgs on loongarch64. loongarch64 support of haskell is only available after ghc>=9.12 and llvm>=18. Currently our default is ghc 9.6 and llvm 15.03:54:06
@aleksana:mozilla.orgFind me at aleksana:qaq.liThere are two issues here, the less significant issue is that I need to change the default ghc version to 9.12, but I don't know how compatible our stackage is with this version.03:55:29
@aleksana:mozilla.orgFind me at aleksana:qaq.liThe bigger issue is that I can't rely on 9.10 to compile 9.12, like we do now, so I should package a binary distribution of 9.12, but upstream does not publish binary distribution built for loongarch64.03:56:56
@aleksana:mozilla.orgFind me at aleksana:qaq.liOh, there's hadrian bootstrap source, but upstream only publishes 9.8 and 9.1004:01:30
@aleksana:mozilla.orgFind me at aleksana:qaq.liWait, seems like the support is older than I got, I just have to get a set of patches04:10:25
@aleksana:mozilla.orgFind me at aleksana:qaq.li
In reply to @aleksana:mozilla.org
Oh, there's hadrian bootstrap source, but upstream only publishes 9.8 and 9.10
It's not ghc with hc files generated 😣
04:38:25
@alex:tunstall.xyzAlex
In reply to @aleksana:mozilla.org
The bigger issue is that I can't rely on 9.10 to compile 9.12, like we do now, so I should package a binary distribution of 9.12, but upstream does not publish binary distribution built for loongarch64.
You can cross-compile 9.4 using the LLVM backend and use that to natively compile newer versions.
09:10:30
@aleksana:mozilla.orgFind me at aleksana:qaq.li
In reply to @alex:tunstall.xyz
You can cross-compile 9.4 using the LLVM backend and use that to natively compile newer versions.
There's no loongarch64 support in ghc94 at all
09:15:18
@aleksana:mozilla.orgFind me at aleksana:qaq.liI'm trying to cross compile ghc 9.8.4 with no luck09:15:37
@alex:tunstall.xyzAlexIt doesn't matter. You can use unregisterised mode.09:15:40
@alex:tunstall.xyzAlex AFAIK cross is completely broken with Hadrian.
If you can get it to work, I'd love to know how.
09:16:05
@aleksana:mozilla.orgFind me at aleksana:qaq.li
In reply to @alex:tunstall.xyz
AFAIK cross is completely broken with Hadrian.
If you can get it to work, I'd love to know how.
I don't write haskell at all tbh
09:16:27
@aleksana:mozilla.orgFind me at aleksana:qaq.li
In reply to @alex:tunstall.xyz
It doesn't matter. You can use unregisterised mode.
Do we have nix code for unregisterised mode already?
09:17:14
@alex:tunstall.xyzAlexUnregisterised GHC relies entirely on the C compiler and needs no knowledge of the target architecture.09:17:16
@alex:tunstall.xyzAlexYes, you can set it explicitly, but GHC will do so automatically if it doesn't recognise the architecture anyway.09:17:49
@aleksana:mozilla.orgFind me at aleksana:qaq.li Oh so pkgsCross.loongarch64-linux.haskell.packages.ghc984.ghc is hadrian 09:21:05
@aleksana:mozilla.orgFind me at aleksana:qaq.li I have to use pkgsCross.loongarch64-linux.haskell.packages.native-bignum.ghc984.ghc and temporarily override enableUnregisterised 09:22:57
@magic_rb:matrix.redalder.orgmagic_rbYoure porting ghc to loongarch?09:26:26
@aleksana:mozilla.orgFind me at aleksana:qaq.li
In reply to @magic_rb:matrix.redalder.org
Youre porting ghc to loongarch?
Not porting, just making it work in nixpkgs
09:26:42
@aleksana:mozilla.orgFind me at aleksana:qaq.liThe porting work has largely done on ghc>=9.6.6 and llvm>=16 actually09:27:06
@magic_rb:matrix.redalder.orgmagic_rb Ah, i went to aliexpress, punched in loongarch64, got a page full of toothbrushes lol 09:27:21

Show newer messages


Back to Room ListRoom Version: 6