!RbXGJhHMsnQcNIDFWN:nixos.org

Haskell in Nixpkgs/NixOS

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

You have reached the beginning of time (for this room).


SenderMessageTime
12 May 2025
@nrs-status:matrix.orgthirdofmay18081814goyaanyone use hnix before?20:23:17
@nrs-status:matrix.orgthirdofmay18081814goyatrying to figure what exactly derivations are20:23:31
@nrs-status:matrix.orgthirdofmay18081814goya in order to have a value for which lib.isDerivation returns true, do we need some effectful build procedure to happen? 20:24:03
@nrs-status:matrix.orgthirdofmay18081814goyahm I would think so given that the interpreter returns a path when you pass a variable that is a derivation to the nix interpreter20:25:34
@nrs-status:matrix.orgthirdofmay18081814goyathen, constructing a derivation is an effectful, monadic value and it is distinct from the monadic value consisting of running the build procedure specified by the derivation, correct?20:27:18
@maralorn:maralorn.demaralornI have never used hnix but what you are describing seems very consistent to how nix works.21:10:31
@maralorn:maralorn.demaralornDuring the evaluation of a nix expression creating a derivation is also an effectful operation, because it writes the derivation to the nix store. It is in the end a primitive builtin function which creates the derivation and returns an object describing it (e.g. containing it's hashes) which then can be used in further calculations in the nix language.21:15:09
@maralorn:maralorn.demaralornThat all is independent and separate of the execution of the build described in the derivation.21:16:08
@nrs-status:matrix.orgthirdofmay18081814goyahm I see, right makes sense21:19:56
@nrs-status:matrix.orgthirdofmay18081814goyathanks for the comments!21:19:59
@vaibhavsagar:matrix.orgvaibhavsagar I have a GHC 9.10 executable that compiles just fine but gives me an internal error: ARR_WORDS object (0x4203ec35d8) entered! when I run it 22:20:19
@vaibhavsagar:matrix.orgvaibhavsagarIt was working with a previous version of Nixpkgs so I'm wondering how to figure out what went wrong22:20:44
@alexfmpe:matrix.orgalexfmpeThat sounds cursed22:52:05
@terrorjack:matrix.orgterrorjacki'd say it's worth reporting in ghc issue tracker if you have a repro with bad/good nixpkgs rev23:00:48
@vaibhavsagar:matrix.orgvaibhavsagarcool, I do have a (large) repro so I'll try that23:54:36
13 May 2025
@vaibhavsagar:matrix.orgvaibhavsagarthanks, I opened https://gitlab.haskell.org/ghc/ghc/-/issues/2603300:04:56
@b:chreekat.netchreekat does cabal --enable-executable-static work on NixOS? I just get a ton of endefined references to everything from the linker 13:32:14
@b:chreekat.netchreekat * does cabal --enable-executable-static work on NixOS? I just get a ton of undefined references to everything from the linker 13:32:20
@winston:winston.shwinston this might help, depending on your dependencies it can be quite involved 17:11:42
@maralorn:maralorn.demaralorn Does anyone know whether overriding ghc works via ghc = … super.ghcin a haskellPackages overlay? 17:44:24
@b:chreekat.netchreekat winston: i think doing it in a nix build is actually somewhat more explored than what I am trying to do, which is just use cabal in a nix shell 18:40:05
@alex:tunstall.xyzAlex
In reply to @maralorn:maralorn.de
Does anyone know whether overriding ghc works via ghc = … super.ghcin a haskellPackages overlay?
My understanding of how the whole thing is wired suggests that it ought to work.
19:40:06
14 May 2025
@sternenseemann:systemli.orgsterni (he/him)probably is broken in some way14:26:11
@sternenseemann:systemli.orgsterni (he/him)Anything blocking https://github.com/NixOS/nixpkgs/pull/404362? I think it can be merged.14:27:05
@nrs-status:matrix.orgthirdofmay18081814goya it's not normal for template-haskell not to appear in the global package db for ghc66 right? 15:12:06
@nrs-status:matrix.orgthirdofmay18081814goya by global package db I mean the path given by ghc --info 15:12:17
@nrs-status:matrix.orgthirdofmay18081814goya or equivalently (i just learned) ghc-pkg list 15:19:05

Show newer messages


Back to Room ListRoom Version: 6