!RbXGJhHMsnQcNIDFWN:nixos.org

Haskell in Nixpkgs/NixOS

745 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.org149 Servers

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


SenderMessageTime
24 Jun 2025
@ners:nixos.devnershttps://github.com/ners/nix-wasm/blob/main/flake.nix As a working example, here I create a Haskell package set with the WASM GHC (and recreate the entire stdenv while I'm at it).14:45:32
@maralorn:maralorn.demaralornIt is much more complicated than what you are trying to do though, since it is cross-compiling.15:53:30
@magic_rb:matrix.redalder.orgmagic_rbYeah for me it was quite simple, just took ages to compile :D15:59:11
@lenny:flipdot.orgLenny. changed their display name from Lenny. [9731 DECT] to Lenny..20:25:08
@le:4d2.org@le:4d2.org

I'm a complete newbie to nix, so please excuse my lack of knowledge:

I'm trying to build the broken package haskore, which is auto-generated by hackage2nix. When building with NIXPKGS\_ALLOW\_BROKEN=1, the build fails with a dependency error (which looks like it comes from cabal, even tough I'm building with nix?):

CallStack (from HasCallStack):
  withMetadata, called at libraries/Cabal/Cabal/src/Distribution/Simple/Utils.hs:368:14 in Cabal-3.10.3.0-cb0e:Distribution.Simple.Utils
Error: Setup: Encountered missing or private dependencies:
bytestring >=0.9 && <0.11, transformers >=0.0.1 && <0.6

Now, further 'investigation' showed, that the packages bytestringand transformersare not in nixpkgs, because the modules they provide are automatically installed when installing ghc.

When trying to tell nix to just not care about those dependencies, I looked into the auto-generated hackage-packages.nix and, indeed, the dependencies for bytestring and transformers are in the buildInputs. But the confusing part is, that many packages have those dependencies, but build perfectly fine, even tough their dependencies, as it seems to me, can't be fulfilled.

Even tough I didn't test it (because I didn't understand how), I believe the error persists in the haskell-updates branch, since the package definition of haskore didn't change.

Can someone explain this to me? Does testHaskellDepends have anything to do with the problem? And do I, with just enough understanding of nix to successfully build my NixOS System, have a chance to fix this issue locally or upstream in about 1-2 days of work? Might someone even volunteer to help me with this?

20:52:39
@le:4d2.org@le:4d2.org *

I'm a complete newbie to nix, so please excuse my lack of knowledge:

I'm trying to build the broken package haskore, which is auto-generated by hackage2nix. When building with NIXPKGS\_ALLOW\_BROKEN=1, the build fails with a dependency error (which looks like it comes from cabal, even tough I'm building with nix?):

CallStack (from HasCallStack):
  withMetadata, called at libraries/Cabal/Cabal/src/Distribution/Simple/Utils.hs:368:14 in Cabal-3.10.3.0-cb0e:Distribution.Simple.Utils
Error: Setup: Encountered missing or private dependencies:
bytestring >=0.9 && <0.11, transformers >=0.0.1 && <0.6

Now, further 'investigation' showed, that the packages bytestring and transformers are not in nixpkgs, because the modules they provide are automatically installed when installing ghc.

When trying to tell nix to just not care about those dependencies, I looked into the auto-generated hackage-packages.nix and, indeed, the dependencies for bytestring and transformers are in the buildInputs. But the confusing part is, that many packages have those dependencies, but build perfectly fine, even tough their dependencies, as it seems to me, can't be fulfilled.

Even tough I didn't test it (because I didn't understand how), I believe the error persists in the haskell-updates branch, since the package definition of haskore didn't change.

Can someone explain this to me? Does testHaskellDepends have anything to do with the problem? And do I, with just enough understanding of nix to successfully build my NixOS System, have a chance to fix this issue locally or upstream in about 1-2 days of work? Might someone even volunteer to help me with this?

20:54:33

Show newer messages


Back to Room ListRoom Version: 6