!RbXGJhHMsnQcNIDFWN:nixos.org

Haskell in Nixpkgs/NixOS

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

Load older messages


SenderMessageTime
12 May 2025
@hellwolf:matrix.orghellwolfI understand. I guess my question is can we freeze haskellPackages, including the one that I customize locally?09:17:21
@hellwolf:matrix.orghellwolf* I understand. I guess my question is can we freeze haskellPackages for a cabal project to consume, including the one that I customize locally?09:17:36
@locallycompact-github:matrix.orgDaniel FirthTurning a haskell package set into a cabal freeze file sounds possible in theory I guess09:24:37
@locallycompact-github:matrix.orgDaniel Firth(I don't know the cabal freeze format at all actually)09:24:56
@hellwolf:matrix.orghellwolfit seems not hard., and I think it's a very good usecase for distributing "known working" package set10:14:08
@hellwolf:matrix.orghellwolfI am working on a DSL kit, and I don't want to deal with downstream's complain that their randomly tracked cabal package set is broken.10:14:43
@hellwolf:matrix.orghellwolfI want to have a control to eliminate such a support need. Of course, it has its tradeoffs. But I am quite happy with the general up-to-date-ness of nixpkgs haskellPackages 10:15:25
@hellwolf:matrix.orghellwolf

If you look at head.package, or downstream needs to do is this snippets:

repository head.hackage.ghc.haskell.org
   url: https://ghc.gitlab.haskell.org/head.hackage/
   secure: True
   key-threshold: 3
   root-keys:
       26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329
       7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d
       f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89

we could have a https://ghc.gitlab.haskell.org/head.haskellPackages/

10:16:34
@hellwolf:matrix.orghellwolf *

If you look at head.package, or downstream needs to do is this snippets:

repository head.hackage.ghc.haskell.org
   url: https://ghc.gitlab.haskell.org/head.hackage/
   secure: True
   key-threshold: 3
   root-keys:
       26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329
       7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d
       f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89

we could have a https://ghc.gitlab.haskell.org/head.haskellPackages/ e.g.

10:16:36
@qyliss:fairydust.spaceAlyssa Ross left the room.10:33:13
@teoc:matrix.orgTeo (he/him)head.hackage is a few things: a set of patches, a hackage overlay generated from those patches, scripts to test GHC against the patches and some other packages. I think we often overemphasize the hackage overlay, since that's what downstream users consume. But we do fix package versions through the patches we have and the other packages we specify10:47:48
@teoc:matrix.orgTeo (he/him)And that's what ends up in the freeze file we output10:49:39
@teoc:matrix.orgTeo (he/him)You might be interested in https://github.com/input-output-hk/foliage, head.hackage is soon switching over to using that to generate the Hackage overlay10:50:38
@locallycompact-github:matrix.orgDaniel Firth hellwolf: You might also be interested in looking at https://horizon-haskell.net although I'm not sure it addresses your problem specifically. 11:14:14
@sternenseemann:systemli.orgsterni (he/him) alexfmpe: https://hydra.nixos.org/build/296940162/nixlog/2 12:19:35
@alexfmpe:matrix.orgalexfmpehttps://github.com/NixOS/nixpkgs/pull/40644613:10:59
@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

Show newer messages


Back to Room ListRoom Version: 6