!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/140 Servers

Load older messages


SenderMessageTime
7 May 2025
@alex:tunstall.xyzAlexI don't know if Hydra specifically is designed to limit memory usage. I don't recall such an option being very prominent in the configuration section of the Hydra manual.21:41:01
@qyliss:fairydust.spaceAlyssa Ross
In reply to @maralorn:maralorn.de
Because the build I am currently trying is roughly at 100G RAM right now, so even if it succeeds, which seems unlikely, it doesn’t seem like a viable solution. πŸ˜„
that's same ballpark as linking firefox so it might be fine if it's tagged as big-parallel
21:42:24
@alexfmpe:matrix.orgalexfmpeThat....not.....what21:46:05
@alex:tunstall.xyzAlex That sounds like more of a bfd ld thing than a Firefox thing.
For the morbidly curious: try building Firefox with mold?
21:49:15
@qyliss:fairydust.spaceAlyssa RossIt's built with LLD21:52:40
@qyliss:fairydust.spaceAlyssa RossI think it's mostly because of the debug symbols21:52:42
8 May 2025
@industrial:matrix.org@industrial:matrix.org left the room.20:31:15
9 May 2025
@bodzioney:matrix.orgEthan BodzioneyHey everyone, new-ish nix user here. I work with a decent amount of haskell code and I'm trying to get it setup but see a lot of contradictory recommendations online. I'm currently working in a repo with a bunch of stack projects in different directories. The way I previously would have done this is just entered each one and run stack build. Do I have to give each of them a derivation now? Or is there an easier way to do this?21:02:18
@maralorn:maralorn.demaralornThis depends a lot on what your goal is. Generally the rule with our setup is: 1 package (cabal or stack) -> 1 derivation. Although that doesn't have to be tedious because you can easily autogenerate them.21:13:03
@maralorn:maralorn.demaralornWith the exception of haskell.nix all "contradictory recommendations" mostly only differ in different more or less helpful abstraction layers to manage the derivations generate with cabal2nix. I don't think it matters much which to use but I understand that it's all a bit overwhelming.21:16:12
@maralorn:maralorn.demaralornGenerally I would recommend against pulling in significant nix dependencies other than nixpkgs. Flakes or not is really a matter of taste and quite orthogonal to the rest.21:24:32
@maralorn:maralorn.demaralornBut feel free to ask more concrete questions.21:24:55
@bodzioney:matrix.orgEthan BodzioneyI'm curious how you autogenerate them?21:27:27
@bodzioney:matrix.orgEthan BodzioneyAlso is stack really used with nix? It seems that nix replaces its functionality.21:28:24
@alex:tunstall.xyzAlex
In reply to @bodzioney:matrix.org
I'm curious how you autogenerate them?
Usually with cabal2nix. There is callCabal2nix in Nixpkgs for a very convenient way of using it.
21:34:45
@alex:tunstall.xyzAlex
In reply to @bodzioney:matrix.org
Also is stack really used with nix? It seems that nix replaces its functionality.
AFAIK it's only useful if you're on NixOS and really need to use Stack for whatever reason.
Most people here probably use Nix without Stack.
21:35:31
@maralorn:maralorn.demaralorn
In reply to @bodzioney:matrix.org
Also is stack really used with nix? It seems that nix replaces its functionality.
Well, stack and cabal can provide incremental builds during development usually also one of them is used to setup HLS. I assume most nix users use cabal for that but I think stack should work for that, too.
21:38:29
@maralorn:maralorn.demaralornBut I wouldn't now how to productively develop a project only with nix. Especially since nix requires a .cabal file to build the project.21:40:04
@maralorn:maralorn.demaralornI don't know which is the best recent guide on setting up a haskell project right now. I know that I disagree with all of them a little but I never got to writing my own. πŸ˜ƒ21:41:32
@maralorn:maralorn.demaralorn * 21:42:09
@bodzioney:matrix.orgEthan BodzioneyCurrently I have a flake file which calls cabal2nix and sets up a dev shell, but there's no way to automate that right? Just copy and paste I assume?21:47:42
@maralorn:maralorn.demaralorn
In reply to @bodzioney:matrix.org
Currently I have a flake file which calls cabal2nix and sets up a dev shell, but there's no way to automate that right? Just copy and paste I assume?
The call to cabal2nix can be automated se the comment by Alex above.
21:55:56
@maralorn:maralorn.demaralornOh wait21:57:03
@bodzioney:matrix.orgEthan BodzioneySorry, should have specified. I'm using callCabal2nix. I meant more so about generating a full flake from a cabal file21:57:06
@maralorn:maralorn.demaralornAh , yeah no that's a lot of cargoculting21:57:34
@maralorn:maralorn.demaralorn But of course you can have one flake for all your subpackages together 21:57:58
@maralorn:maralorn.demaralornIf they are in the same git repo that's the way to go21:58:27
@bodzioney:matrix.orgEthan Bodzioney"cargoCulting"? That's a new one lol21:58:52
@maralorn:maralorn.demaralornUh, I am not sure what that word means, people use it all the time and it kinda means copying what everyone else does (without understanding it). I think that predates the rust package manager. πŸ˜†22:00:41
@toonn:matrix.orgtoonn It's as if you're cargo culting cargo culting : D 22:01:18

Show newer messages


Back to Room ListRoom Version: 6