!RbXGJhHMsnQcNIDFWN:nixos.org

Haskell in Nixpkgs/NixOS

734 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.org147 Servers

Load older messages


SenderMessageTime
27 Jan 2026
@alexfmpe:matrix.orgalexfmpe *

well poop, looks like running iserv-proxy for cross template haskell requires __darwinAllowLocalNetworking = true on the package that uses TH, maybe we'll want that whole "use unix domain socket" bit sooner than expected

we hadn't noticed this before because we couldn't even try it
a) cross from aarch64-darwin is broken alltogether: https://gitlab.haskell.org/ghc/ghc/-/issues/24939
b) the 'soft' cross of pkgsStatic was also broken: https://github.com/NixOS/nixpkgs/pull/484571

23:14:56
28 Jan 2026
@ashinnv:matrix.orgm changed their display name from Supreme Allied Commander Mayhem, Lord of the Nine Stars to GOD EMPEROR MAYHEM - OVERSEER OF ENTROPY AND THE SECOND LAW.00:37:02
@locallycompact-github:matrix.orgDaniel FirthHey guys. We're looking at trying to include the cardano-node in nixpkgs. I'm thinking of ways to do this and obviously since it involves CHaP and also significantly deviates from stackage just on the hackage dependencies I'm wondering if you have any thoughts on what you would accept as a way to this.11:35:25
@locallycompact-github:matrix.orgDaniel Firth* Hey guys. We're looking at trying to include the cardano-node in nixpkgs. I'm thinking of ways to do this and obviously since it involves CHaP and also significantly deviates from stackage just on the hackage dependencies I'm wondering if you have any thoughts on what you would accept as a way to do this.11:35:37
@maralorn:maralorn.demaralornWhat’s CHaP?11:39:30
@maralorn:maralorn.demaralornI am pretty sure there are examples on how to package non-hackage packages in nixpkgs.11:40:13
@maralorn:maralorn.demaralornIncluding some with a non-neglectable number of overrides.11:40:47
@maralorn:maralorn.demaralornActually I think even cachix does it.11:41:01
@dermetfan:matrix.orgRobin Stumm joined the room.11:48:38
@dermetfan:matrix.orgRobin Stummhttps://github.com/IntersectMBO/cardano-haskell-packages11:49:23
@locallycompact-github:matrix.orgDaniel FirthWe could be looking at more than 50% of the build plan would be custom, so 300 or more packages.11:52:13
@maralorn:maralorn.demaralornOooh.11:54:09
@maralorn:maralorn.demaralornI mean I wonder how large that would be in comparison to other large derivation packages in nixpkgs. Like those with a checked in npm or cargo lock.11:55:36
@locallycompact-github:matrix.orgDaniel Firth

It would be more or less exactly the same size as the equivalent horizon expression here. https://gitlab.horizon-haskell.net/package-sets/horizon-cardano

nix build 'git+https://gitlab.horizon-haskell.net/package-sets/horizon-cardano#horizon-cardano'

11:57:33
@maralorn:maralorn.demaralornIf you can encapsulate it cleanly (i.e. without interfering with the rest of haskellPackages) and the size is manageable it seems fine-ish. Of course there is then also the matter of maintainership. It mustn’t become a burden on the haskell team.11:57:39
@locallycompact-github:matrix.orgDaniel Firth That would be one option to just upstream the whole horizon expression under haskellPackages.horizon.cardano, if that's something nixpkgs would accept. 11:58:10
@locallycompact-github:matrix.orgDaniel FirthWould be much easier than trying to solve which parts of nixpkgs could be reused.11:58:36
@locallycompact-github:matrix.orgDaniel Firth *

It would be more or less exactly the same size as the equivalent horizon expression here. https://gitlab.horizon-haskell.net/package-sets/horizon-cardano

nix build 'git+https://gitlab.horizon-haskell.net/package-sets/horizon-cardano#cardano-node'

11:58:56
@maralorn:maralorn.demaralornI am sceptical. Also curious what the others think.12:01:00
@maralorn:maralorn.demaralornMaybe we can have this discussion more organized on a GitHub issue?12:01:32
@locallycompact-github:matrix.orgDaniel FirthIt would basically be a wholly independent package set. It might reuse the ghc definition but nothing else.12:01:42
@locallycompact-github:matrix.orgDaniel FirthSure. I'll write it up.12:01:46
@toonn:matrix.orgtoonn What is the goal? Are there existing dependents that would be desirable to package for users? 12:03:40
@toonn:matrix.orgtoonn End-users, not developer-users. 12:03:54
@locallycompact-github:matrix.orgDaniel Firth The goal is to package cardano-node for end users yes, not developers. But maintaining the build plan for cardano-node manually in nixpkgswith overrides and whatnot would be infeasible. 12:05:21
@locallycompact-github:matrix.orgDaniel Firth Occasionally dropping a new horizon expression as a separate package set expression into nixpkgs, one that didn't interfere with haskellPackages proper, would be quite easy for me to automate, it just depends whether that's OK or not. 12:08:34
29 Jan 2026
@alexfmpe:matrix.orgalexfmpe

when using pkgsStatic on my aarch64-darwin, most packages correctly build only the .o

$ nix-build -A pkgsStatic.haskell.packages.ghc910.these
Building library for these-1.2.1...
[1 of 3] Compiling Data.Functor.These ( src/Data/Functor/These.hs, dist/build/Data/Functor/These.o )

however there's a few odd ones where .dyn_o is also attempted

$ nix-build -A pkgsStatic.haskell.packages.ghc910.deferred-folds
Building library for deferred-folds-0.9.18.7...
[ 1 of 11] Compiling DeferredFolds.Prelude ( library/DeferredFolds/Prelude.hs, dist/build/DeferredFolds/Prelude.o, dist/build/DeferredFolds/Prelude.dyn_o )

$ nix-build -A pkgsStatic.haskell.packages.ghc910.constraints-extras
Building library for constraints-extras-0.4.0.2..
[1 of 4] Compiling Data.Constraint.Compose ( src/Data/Constraint/Compose.hs, dist/build/Data/Constraint/Compose.o, dist/build/Data/Constraint/Compose.dyn_o )

$ nix-build -A pkgsStatic.haskell.packages.ghc910.language-nix
Building library for language-nix-2.3.0...
[1 of 4] Compiling Language.Nix.Identifier ( src/Language/Nix/Identifier.hs, dist/build/Language/Nix/Identifier.o, dist/build/Language/Nix/Identifier.dyn_o )

unsurprisingly, these all fail with Failed to load dynamic interface file for <import>

01:25:46
@alexfmpe:matrix.orgalexfmpe but where are these random .dyn_o coming from? 01:26:03
@alexfmpe:matrix.orgalexfmpe

we're passing both

 --disable-shared
 --disable-executable-dynamic
01:27:58
@alexfmpe:matrix.orgalexfmpethese / language-nix got pretty much the same configureFlags, save for the package-db01:39:34

Show newer messages


Back to Room ListRoom Version: 6