!RbXGJhHMsnQcNIDFWN:nixos.org

Haskell in Nixpkgs/NixOS

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

Load older messages


SenderMessageTime
15 Sep 2025
@keypusher:matrix.orgkeypusherThanks 🎉16:37:15
@sternenseemann:systemli.orgsterni I noticed that, too, yesterday, I think this is a bug and is probably fixable 17:43:17
@alex:tunstall.xyzAlex
In reply to @sternenseemann:systemli.org
I would just start with adding a MicroHs package set built with GHC as we don't have hugs and then just iterate on that; maybe add hugs separately, have a hugs package set (if that even makes sense).
Not sure which branch to PR to.
I assume haskell-updates is the best choice?
(Hugs fix without GCC 13 is ready.)
22:37:00
@sternenseemann:systemli.orgsternican also be master if you don’t depend on anything in h-u22:47:03
@alex:tunstall.xyzAlexEven for the mhs package set?22:48:00
@alex:tunstall.xyzAlex
In reply to @sternenseemann:systemli.org
can also be master if you don’t depend on anything in h-u
Hugs fix: https://github.com/NixOS/nixpkgs/pull/443281
22:53:44
@sternenseemann:systemli.orgsternithe mhs package set is probably better on h-u since we’d want to figure out CI22:58:06
@sternenseemann:systemli.orgsterniI’ll just see to it that hugs gets propagated quickly to the branch after megre22:58:29
@alex:tunstall.xyzAlexOk, thanks.22:58:50
16 Sep 2025
@bglgwyng:matrix.orgbglgwyng Do you mean a bug in builtins.functionArgs? 00:08:45
@bglgwyng:matrix.orgbglgwynghttps://github.com/bglgwyng/nix-x-cabal I wrote another Nix + Haskell framework. It is based on flake-parts and uses plan.json to reproducible builds. It delegates all the network access from Cabal to Nix, and runs cabal build in pure way.04:59:21
@bglgwyng:matrix.orgbglgwyng It doesn't use pre-baked package set, but resolves version constraints. So you can freely choose any version of ghc(at this moment, in nixpgks.haskell.packages.ghc***) 05:00:45
@bglgwyng:matrix.orgbglgwyngI wish I could provide the docs right now, but nix-options-doc and flake-parts don't play well together for some reasons..05:10:06
@alex:tunstall.xyzAlex
In reply to @bglgwyng:matrix.org
https://github.com/bglgwyng/nix-x-cabal

I wrote another Nix + Haskell framework. It is based on flake-parts and uses plan.json to reproducible builds. It delegates all the network access from Cabal to Nix, and runs cabal build in pure way.

Do you have a typo here?

https://github.com/bglgwyng/nix-x-cabal/blob/4c7136218ba15da9304a054fbaeb8641db5592c3/lib/make-noindex-repository.nix#L4

(Was looking through wondering whether you're using IFD.)

07:17:46
@bglgwyng:matrix.orgbglgwyngThanks! 07:19:13
@bglgwyng:matrix.orgbglgwyngNo I don't use IFD07:19:16
@alex:tunstall.xyzAlex

Are you sure? It looks to me like you do...

https://github.com/bglgwyng/nix-x-cabal/blob/4c7136218ba15da9304a054fbaeb8641db5592c3/modules/cabal-project.nix#L118

Or maybe I am mistaken and using builtins.readFile on an output is not IFD?

07:20:28
@bglgwyng:matrix.orgbglgwyng ah... callCabal2Nix might use IFD internally 07:20:35
@alex:tunstall.xyzAlex
In reply to @bglgwyng:matrix.org
ah... callCabal2Nix might use IFD internally
That does too IIRC.
07:20:51
@bglgwyng:matrix.orgbglgwyng Is readJSON (readFile ...) also considred IFD? 07:21:10
@bglgwyng:matrix.orgbglgwyngI thought that import in IFD means the usage of `import' keyword07:21:40
@wolfgangwalther:matrix.orgWolfgang WaltherIf the file is an output of another derivation, then yes. See https://nix.dev/manual/nix/2.30/language/import-from-derivation.07:22:08
@bglgwyng:matrix.orgbglgwyng I think I can remove the usage of callCabal2nix and it's in the roadmap 07:22:18
@alex:tunstall.xyzAlex I guess disabling IFD with --option is one way of being sure. 07:22:19
@mangoiv.:matrix.orgMangoIVit's every time where you have an output and you reflect whatever that output contains back into the evaluation phase07:22:48
@bglgwyng:matrix.orgbglgwyngI see07:24:03
@alex:tunstall.xyzAlex IFD is far from a show-stopper for most people, but it does mean slower evaluation when e.g. entering nix-shell. 07:24:04
@mangoiv.:matrix.orgMangoIVFrom a build system theory perspective, the issue is, that while nix normally can do planning statically, because it's (without IFD) an Applicative build system, if you need to build first, you basically get intransparent branching from nix' perspective07:24:41
@mangoiv.:matrix.orgMangoIVwhich is funny because the slower evaluation is just an implementation problem, while there are actual theoretical problems with this that are not the problem that people face in practice (e.g. the issue that you cannot usefully distribute to build machines before having a full plan, which requires building all the IFD first) 07:26:20
@bglgwyng:matrix.orgbglgwyngHmm indeed I started to write nix-x-cabal when I found a small bug(maybe?) in haskell.Nix and also found haskell.Nix is too complicated.07:26:48

Show newer messages


Back to Room ListRoom Version: 6