!RbXGJhHMsnQcNIDFWN:nixos.org

Haskell in Nixpkgs/NixOS

733 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
7 Feb 2026
@alex:tunstall.xyzAlex It's inconsistent because haskell-updates gets all non-broken packages for its default GHC cached, but sometimes master (and thus nixpkgs-unstable) deviates slightly from it. 20:15:47
@alexfmpe:matrix.orgalexfmpe ah fair, I was checking in haskell-updates 20:17:53
@alexfmpe:matrix.orgalexfmpe

seems pretty much the same in current master:

$ nix-build -A haskell.packages.ghc912.haskell-language-server --dry-run 2>&1 | grep "will be"
these 507 paths will be fetched (357.33 MiB download, 4501.69 MiB unpacked):

$ nix-build -A haskell.packages.ghc912.linear --dry-run 2>&1 | head -n 4
these 2 derivations will be built:
  /nix/store/57bmq5jy0sraqqava0jr0swivma0xd0q-bytes-0.17.4.drv
  /nix/store/pbghk5rsl6s077p32m655yvn8c8fc246-linear-1.23.2.drv
these 100 paths will be fetched (36.87 MiB download, 465.34 MiB unpacked):
20:18:59
8 Feb 2026
@sternenseemann:systemli.orgsterni (he/him)we've removed 9.12.1, so must be an old revision11:52:55
@b:chreekat.netchreekat

If I try to override Cabal and Cabal-syntax in a package set, why do I end up with multiple versions of Cabal? In particular I get this serious warning:

Warning:
    This package indirectly depends on multiple versions of the same package. This is very likely to cause a compile failure.
      package hackage-security (hackage-security-0.6.2.4-7CLHB9zPIN0FxCfhihIq1r) requires Cabal-syntax-3.10.3.0
      package Cabal (Cabal-3.12.1.0-HdYCe711lcf3vEdSKCpUQK) requires Cabal-syntax-3.12.1.0-JlhyVgsDFbHIDMshThsYz

Is it because those packages are not overridable (boot packages or such)? Or could it be configure-time dependencies?

12:28:56
@b:chreekat.netchreekatAm I right in assuming that usually if you override a package in a package set (examples from the file I'm modifying: https://github.com/commercialhaskell/stackage-server/blob/master/package.nix), the override you specify becomes the only version of that package available, regardless of where it lives in the dependency tree of other packages in the set?12:31:10
@sternenseemann:systemli.orgsterni (he/him)This is true, but the core packages bundled on GHC still depend on other core packages. So if you want to globally override Cabal, you also need to globally override all core packages that (indirectly) depend on Cabal, so they get rebuilt.12:32:18
@sternenseemann:systemli.orgsterni (he/him)Then you also need to convince the cabal solver to pick those packages over the core packages which can sometimes be tricky (but usually just works).12:32:44
@sternenseemann:systemli.orgsterni (he/him)in this case the latter seems to be happening, i.e. hackage-security is still built against the core package12:33:37
@b:chreekat.netchreekatOk, so my memory/intuition was fairly correct. How can I do a "null" override for hackage-security and any other packages, so they get rebuilt? certainly not just hackage-security = old.hackage-security, ... 12:36:19
@sternenseemann:systemli.orgsterni (he/him)should be rebuild as it has a Cabal input. Check what version it is and what constraints it has on Cabal. Maybe it just doesn't allow 3.12.12:39:34
@b:chreekat.netchreekatcool, things seem to be progressing by setting jailbreak = true for the package. Oh, what terrors may await12:43:33
@b:chreekat.netchreekat (I thought about just bumping the nixpkgs pin to pick up a newer version of Cabal, but since this particular project is upstream of the snapshots that are upstream of nixpkgs packages I thought it would be good to ensure I can independently upgrade Cabal to pick up packages that use newer versions) 12:44:39
@b:chreekat.netchreekat damn, that changed the hash and rebuilt some stuff, but it did not get any further 12:45:35
@sternenseemann:systemli.orgsterni (he/him) you can try passing --constraint=Cabal>=3.12 as a configure flag 12:46:33
@b:chreekat.netchreekatooh, neat, searching for a flag like that found some good examples of massaging dependencies on Cabal12:48:47
@b:chreekat.netchreekat

This did a thing, but it created an impossible condition by adding && Cabal>=3.12 to every existing branch of the constraint on Cabal :)

Error: Setup: Encountered missing or private dependencies:
Cabal ((>=1.14 && <1.26 || >=2.0 && <2.6 || >=3.0 && <3.7) && >=3.12) &&
(>=1.14 && <1.26 || >=2.0 && <2.6 || >=3.0 && <3.7) && >=3.12 || (>=3.7 &&
<3.12) && >=3.12,
12:58:37
@sternenseemann:systemli.orgsterni (he/him)ah right the constraints are behind a conditional, so jailbreak won't relax them.13:00:23
@sternenseemann:systemli.orgsterni (he/him)you need to either patch that or more likely upgrade to a version of hackage-security that does support Cabal 3.12 since I doubt it will build even if you patch the cabal file13:00:58
@b:chreekat.netchreekatok, i'll fall back to just bumping the nixpkgs pin for now13:01:26
@b:chreekat.netchreekatthanks for the help!13:03:26
@sternenseemann:systemli.orgsterni (he/him)wonder when one of those cabal install plan to nix generator projects finally pans out. Should be very possible to make one. I think those would be pretty useful, or alternatively ig revive something like stackage2nix13:07:27
@sternenseemann:systemli.orgsterni (he/him)maybe people just need to stop trying to make it happen with ifd first…13:07:38
@b:chreekat.netchreekatfor real13:50:38
@toonn:matrix.orgtoonn Can it be done without IFD? Or are you talking about the cabal2nix approach, generating it ahead of time? 13:57:31
@b:chreekat.netchreekatWhat's that new thing that's some sort of recursive nix? Ah, this: https://github.com/NixOS/rfcs/blob/master/rfcs/0092-plan-dynamism.md14:03:01
@toonn:matrix.orgtoonn Without IFD or a functional equivalent, I guess. 14:08:13
@b:chreekat.netchreekatI'm pumped about this, I feel like it could do something special with stackage14:17:42
@b:chreekat.netchreekatSpecifically casa14:17:53
@teoc:matrix.orgTeo (he/him)Yeah I used it here for getting cabal files but using nix and casa for packages seems trickier cause the hashing is different(?) https://github.com/cdepillabout/stacklock2nix/commit/3b6eee1ccb533a588be12666ea14e5e05bfe018315:18:54

Show newer messages


Back to Room ListRoom Version: 6