!RbXGJhHMsnQcNIDFWN:nixos.org

Haskell in Nixpkgs/NixOS

703 Members
For discussions and questions about Haskell with Nix, cabal2nix and haskellPackages in nixpkgs | Current Docs: https://nixos.org/manual/nixpkgs/unstable/#haskell | Current PR: https://github.com/nixos/nixpkgs/pulls?q=is%3Apr+is%3Aopen+head%3Ahaskell-updates | Maintainer Docs: https://github.com/NixOS/nixpkgs/blob/haskell-updates/pkgs/development/haskell-modules/HACKING.md | More Nix: #community:nixos.org | More Haskell: #haskell-space:matrix.org | Merger Schedule: https://cloud.maralorn.de/apps/calendar/p/H6migHmKX7xHoTFa/dayGridMonth/now | Join #haskell.nix:libera.chat for question about the alternative haskell.nix infrastructure139 Servers

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


SenderMessageTime
25 Jul 2025
@mequbic:matrix.orgiqubic (she/her)Hmm... I think I might be doing something wrong. So I have this bare-bones starter project of mine: https://github.com/IQubic/mandelbrot00:10:59
@mequbic:matrix.orgiqubic (she/her)

And entering the nix-shell works. But then attempting to run cabal repl fails with this:

Resolving dependencies...
Error: [Cabal-7107]
Could not resolve dependencies:
[__0] next goal: mandelbrot (user goal)
[__0] rejecting: mandelbrot-0.1.0.0 (conflict: requires GHC2024 which is not supported)
[__0] fail (backjumping, conflict set: mandelbrot)
After searching the rest of the dependency tree exhaustively, these were the goals I've had most trouble fulfilling: mandelbrot
00:12:02
@mequbic:matrix.orgiqubic (she/her) Does cabal not support GHC2024 yet? 00:12:13
@le:4d2.org@le:4d2.org
In reply to @mequbic:matrix.org
Does cabal not support GHC2024 yet?

GHC2024 is only supported if you have at least version 9.10 of ghc, according to a warning when initialising projects with cabal. nix installs 9.8.4 by default though.

When I explicitly install a newer version using nix-shell -p cabal-install haskell.compiler.ghc9122, which installs ghc version 9.12.2, it works.

(Well "works": I get a different error, which could be resolved with changing base ^>= 4.19.2.0 to base >= 4.19.2.0 in mandelbrot.cabal, but that's a different topic)

05:49:07
@le:4d2.org@le:4d2.org
In reply to @le:4d2.org

GHC2024 is only supported if you have at least version 9.10 of ghc, according to a warning when initialising projects with cabal. nix installs 9.8.4 by default though.

When I explicitly install a newer version using nix-shell -p cabal-install haskell.compiler.ghc9122, which installs ghc version 9.12.2, it works.

(Well "works": I get a different error, which could be resolved with changing base ^>= 4.19.2.0 to base >= 4.19.2.0 in mandelbrot.cabal, but that's a different topic)

To have all of this in your shell.nix, change

myPkg = pkgs.haskellPackages.callCabal2nix "mandelbrot" src {};

to

myPkg = pkgs.haskell.packages.ghc9122.callCabal2nix "mandelbrot" src {};
05:55:45
@aidalgol:matrix.orgaidalgol I need some help understanding this build failure from PR 424162. 06:12:38
@alex:tunstall.xyzAlex
In reply to @aidalgol:matrix.org
I need some help understanding this build failure from PR 424162.
It looks like 8 test failures caused by an attempt to run a missing or not found program.
Check the source code to see what it's trying to execute and try to add it to the test dependencies.
Since these appear to be doctests, they might be failing because the build doesn't have the necessary tools to run doctests available.
08:22:40
@mangoiv.:matrix.orgMangoIV teo (they/he): which hadrian needs your patch? The boot compiler or the actual compiler? (the patch only applies to ghc 9.10 but not to 9.12...) 10:59:43
@teoc:matrix.orgteo (they/he) should be actual compiler, I can rebase my patch for ghc-9.12 13:03:01
@mangoiv.:matrix.orgMangoIV
In reply to @teoc:matrix.org
should be actual compiler, I can rebase my patch for ghc-9.12
I fear then it won’t apply to earlier versions. Building with ghc 9.10 but can only continue when my laptop is idle because while it’s building GHCs it’s unusable
13:04:03
@mangoiv.:matrix.orgMangoIV😌13:04:07

Show newer messages


Back to Room ListRoom Version: 6