!RbXGJhHMsnQcNIDFWN:nixos.org

Haskell in Nixpkgs/NixOS

699 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.org141 Servers

Load older messages


SenderMessageTime
3 Jul 2025
@phileas:asra.grsyd installs gentoo (they/them)
➜  nixpkgs git:(master) ✗ ./maintainers/scripts/haskell/regenerate-hackage-packages.sh --do-commit

Obtaining Hackage data
Generating compiler configuration
Starting hackage2nix to regenerate pkgs/development/haskell-modules/hackage-packages.nix ...
hackage2nix: user error (cannot parse cabal file /nix/store/pv9625kwkhfj0bsgqc374by44ycm88cz-unpacked-cabal-hashes/webdriver-precore/0.1.0.2/webdriver-precore.cabal)
hackage2nix: user error (cannot parse cabal file /nix/store/pv9625kwkhfj0bsgqc374by44ycm88cz-unpacked-cabal-hashes/ulid/0.3.3.0/ulid.cabal)
hackage2nix: user error (cannot parse cabal file /nix/store/pv9625kwkhfj0bsgqc374by44ycm88cz-unpacked-cabal-hashes/tpdb/2.8.1/tpdb.cabal)
hackage2nix: user error (cannot parse cabal file /nix/store/pv9625kwkhfj0bsgqc374by44ycm88cz-unpacked-cabal-hashes/singletons-base-code-generator/0.1/singletons-base-code-generator.cabal)
hackage2nix: user error (cannot parse cabal file /nix/store/pv9625kwkhfj0bsgqc374by44ycm88cz-unpacked-cabal-hashes/singletons-base/3.5/singletons-base.cabal)
hackage2nix: user error (cannot parse cabal file /nix/store/pv9625kwkhfj0bsgqc374by44ycm88cz-unpacked-cabal-hashes/pty-mcp-server/0.0.4.0/pty-mcp-server.cabal)
hackage2nix: user error (cannot parse cabal file /nix/store/pv9625kwkhfj0bsgqc374by44ycm88cz-unpacked-cabal-hashes/pms-ui-response/0.0.3.0/pms-ui-response.cabal)
hackage2nix: user error (cannot parse cabal file /nix/store/pv9625kwkhfj0bsgqc374by44ycm88cz-unpacked-cabal-hashes/pms-ui-request/0.0.3.0/pms-ui-request.cabal)
hackage2nix: user error (cannot parse cabal file /nix/store/pv9625kwkhfj0bsgqc374by44ycm88cz-unpacked-cabal-hashes/pms-ui-notification/0.0.2.0/pms-ui-notification.cabal)
hackage2nix: user error (cannot parse cabal file /nix/store/pv9625kwkhfj0bsgqc374by44ycm88cz-unpacked-cabal-hashes/pms-infrastructure/0.0.4.0/pms-infrastructure.cabal)
hackage2nix: user error (cannot parse cabal file /nix/store/pv9625kwkhfj0bsgqc374by44ycm88cz-unpacked-cabal-hashes/pms-infra-watch/0.0.2.0/pms-infra-watch.cabal)
hackage2nix: user error (cannot parse cabal file /nix/store/pv9625kwkhfj0bsgqc374by44ycm88cz-unpacked-cabal-hashes/pms-infra-procspawn/0.0.1.0/pms-infra-procspawn.cabal)
hackage2nix: user error (cannot parse cabal file /nix/store/pv9625kwkhfj0bsgqc374by44ycm88cz-unpacked-cabal-hashes/pms-infra-cmdrun/0.0.2.0/pms-infra-cmdrun.cabal)
hackage2nix: user error (cannot parse cabal file /nix/store/pv9625kwkhfj0bsgqc374by44ycm88cz-unpacked-cabal-hashes/pms-domain-service/0.0.3.0/pms-domain-service.cabal)
hackage2nix: user error (cannot parse cabal file /nix/store/pv9625kwkhfj0bsgqc374by44ycm88cz-unpacked-cabal-hashes/pms-domain-model/0.0.4.0/pms-domain-model.cabal)
hackage2nix: user error (cannot parse cabal file /nix/store/pv9625kwkhfj0bsgqc374by44ycm88cz-unpacked-cabal-hashes/pms-application-service/0.0.4.0/pms-application-service.cabal)
hackage2nix: thread blocked indefinitely in an MVar operation

18:51:46
@phileas:asra.grsyd installs gentoo (they/them) Reading the history of this channel I can see others also ran into thread blocked indefinitely in an MVar operation. I'm not sure if it the script is fully needed getting nix-tree usable again for others :). 18:53:34
@phileas:asra.grsyd installs gentoo (they/them)https://github.com/NixOS/nixpkgs/issues/409085 ah I didn't get follow up github notifications. https://github.com/NixOS/nixpkgs/pull/409117#issuecomment-289540137618:55:05
@phileas:asra.grsyd installs gentoo (they/them)Well at least I gave updating hackage packages a try for once, good to learn how that is done under the hood.18:57:00
@phileas:asra.grsyd installs gentoo (they/them) * Hey there! I've had some questions, I understand the situation now...
Old message/thread:
I'm trying to bump nix-tree (after asking the developer a while back to bump in hackage https://github.com/utdemir/nix-tree/issues/114#issuecomment-2888634183 ) assuming it would get updated eventually by nixos maintainers and the file says that you should use the regenerate-hackage-packages.sh but that fails on my local machine - I'd like to get in touch with the people maintaining that and assumed there was a Haskell Matrix channel maybe (there aren't a lot of GitHub issues around Hackage/Haskell lately if I'm not mistaken).
19:00:25
@teoc:matrix.orgTeo (he/him) I was profiling eval time of nixpkgs recently and I noticed that a lot of time was spent doing hasPrefix when evalling the haskell package set. I think this is caused by the hasPrefix call to check if stuff is part of amazonka and each call of hasPrefix re-checks if the needle is a path lol https://github.com/NixOS/nixpkgs/issues/419216
We could optimise the hasPrefix call, but maybe we should just add the list of amazonka packages to this file rather than traversing the entire haskell package set?
https://github.com/NixOS/nixpkgs/blob/a44903b927ab16b829a76f51f84bca02a7f89a0f/pkgs/development/haskell-modules/configuration-common.nix#L3352
19:19:35
@alexfmpe:matrix.orgalexfmpe

I was profiling eval time of nixpkgs

how does one even do this? I always wondered

20:24:38
@teoc:matrix.orgTeo (he/him)
In reply to @alexfmpe:matrix.org

I was profiling eval time of nixpkgs

how does one even do this? I always wondered

This is what I used https://github.com/NixOS/nix/pull/13220
20:30:51
@alexfmpe:matrix.orgalexfmpeOoooh20:37:45
4 Jul 2025
@lxsameer:matrix.orglxsameerhey folks,do we support cabal 3.14 for development?15:16:38
@alexfmpe:matrix.orgalexfmpe

not sure what "for development" means, does this answer it?

$ nix-build -A cabal-install
/nix/store/diig4i6ln0ia8xvv4kqs99klpjhlpzfl-cabal-install-3.14.2.0
15:38:44
@lxsameer:matrix.orglxsameer sorry for the confusion, apparently, cabal2nix does not like the cabal-version: 3.14 15:51:24
@lxsameer:matrix.orglxsameerin a cabal file15:51:28
@maralorn:maralorn.demaralornThat was I think fixed very recently on the haskell-updates.15:52:48
@ners:nixos.devners

I found a package that has outdated dependency bounds. Trying to build it with doJailbreak , I would expect it to either succeed or fail at compile time, but:

Configuring OTP-0.1.0.0...
CallStack (from HasCallStack):
  withMetadata, called at libraries/Cabal/Cabal/src/Distribution/Simple/Utils.hs:368:14 in Cabal-3.10.3.0-ab3d:Distribution.Simple.Utils
Error: Setup: Encountered missing or private dependencies:
base >=4.5.0.0 && <4.14,
bytestring >=0.9.2.0 && <0.11,
time >=1.4 && <1.10
16:40:27
@alexfmpe:matrix.orgalexfmpecabal2nix doesn't handle conditionals properly (for now), and the deps are behind a if, so they don't survive the conversion to .nix17:01:15
@alexfmpe:matrix.orgalexfmpehttps://hackage.haskell.org/package/OTP-0.1.0.0/src/OTP.cabal17:01:16
@alexfmpe:matrix.orgalexfmpeYou can workaround by shoving them in with addBuildDepends17:01:41
@alexfmpe:matrix.orgalexfmpeYou can see examples in the configuration-ghcjs-9.x and configuration-darwin files17:02:26
@collinarnett:matrix.orgCollin Arnett How can I get the haddoc html files for dependencies of my project when using shellFor? I have doHaddoc turned on for my dependencies. 18:35:27
@alexfmpe:matrix.orgalexfmpeIt's on by default I think?19:35:28
@alexfmpe:matrix.orgalexfmpeEasiest way is to run hoogle locally19:35:41
@alexfmpe:matrix.orgalexfmpehoogle server --local -p 808019:36:18
@alexfmpe:matrix.orgalexfmpemight need withHoogle = true, don't remember if default in shellFor19:36:48
@collinarnett:matrix.orgCollin ArnettDoes the hoogle server serve the haddocs as well? I'm not really sure what I'm looking for so I would like to browse the docs like I would on hackage.20:44:03
@collinarnett:matrix.orgCollin ArnettOh I see it does link them locally after you click on the package from hoogle. Thank you :D20:49:02
5 Jul 2025
@alexfmpe:matrix.orgalexfmpe is there a way for a nixpkgs-using project to apply an override to all haskell.packages.ghc123 like configuration-common.nix do?
or do we always need the nixpkgs.haskell.packages.${version} override cascade ?
20:20:02
@sternenseemann:systemli.orgsterni (he/him) alexfmpe: haskell.packageOverrides 23:57:26
@sternenseemann:systemli.orgsterni (he/him) which is the default argument for overrides passed to any specific package set, so you can't use that to further extend without doing that explicitly 23:57:57
6 Jul 2025
@alexfmpe:matrix.orgalexfmpeah damn actually this one time in particular I want the specific version thing00:05:26

Show newer messages


Back to Room ListRoom Version: 6