Haskell in Nixpkgs/NixOS | 726 Members | |
| For discussions and questions about Haskell with Nix, cabal2nix and haskellPackages in nixpkgs | Current Docs: https://haskell4nix.readthedocs.io/ | 145 Servers |
| Sender | Message | Time |
|---|---|---|
| 5 Apr 2026 | ||
I dunno where that GHC_PACKAGE_PATH is coming from. is this something worth addressing on nixpkgs? if not, could I somehow fix upstream? | 00:31:05 | |
| 6 Apr 2026 | ||
Why is my native RISC-V GHC 9.8.4 build missing the TH interpreter and GHCi support? I have an old native 9.6.6 build lying around and it has | 08:47:00 | |
| Oh, nevermind, I found the issue. I removed this patch while upgrading Nixpkgs because the default GHC (9.10) has the commit, but then later found that to get there I needed to first build 9.6 or 9.8, which don't have the commit. | 08:50:58 | |
| Nix on macos room (unlinkable right now) is asking what is the purpose of ghc-standalone-archive | 11:25:47 | |
| alexfmpe: see
for some context | 11:27:52 | |
| ask Shea Levy, I guess. I assume it is intended for building a static archive of Haskell libs you can link into iOS applications. I have never seen anybody talking about it or using it, so I'm fine with removing it personally. | 11:31:03 | |
In reply to @sternenseemann:systemli.orgAh got it. Mind if I cook up a couple utils for these unfortunately common test suite tweaks? HOME/tmpDir, ghc_package_path | 11:32:34 | |
| yes, sure may be worth refactoring | 11:32:56 | |
| The pre check exports, that is | 11:33:02 | |
| the thing is that there can't really be a generic solution for everything because there are a lot of mutually incompatible approaches to solving this at the moment. | 11:34:22 | |
| Sure, but we can have a ready made sane default | 11:34:50 | |
| w.r.t. your specific question if you look at the GHC_PACKAGE_PATH stuff, we have a way of preventing our wrapper from setting that if you need cabal. But i expect it'll break in a different way then. | 11:35:18 | |
| if someone has a lot of spare time they could investigate making an opt in alternative generic-builder.nix code path that uses cabal-install which could have some advantages | 11:36:17 | |
| I suspect stack also doesn't set it. First saw this when packaging haskell-debugger and IIRC stack test also got tripped up, only cabal test was green | 11:36:57 | |
| cabal sets GHC_ENVIRONMENT which is annoying to replicate manually unfortunately. | 11:37:26 | |
but it also doesn't do everything for some use cases you need to run cabal v2-exec -- cabal v2-test (i think path being set) | 11:37:52 | |
In reply to @sternenseemann:systemli.orgThat's huh, big. Right now I'm only trying to fix a couple packages without excessive copy pasting | 11:38:01 | |
| don't worry about it, I don't think it solves much we are facing right now. cabal-install also has plenty of problems. | 11:39:18 | |
| i just feel like it may be wise long term since every solution for rough spots in cabal nowadays get designed around cabal-install v2-commands and they are often implemented poorly in Setup.hs to the degree that they are outright broken e.g. https://github.com/haskell/cabal/issues/11598 | 11:40:37 | |
| (the build-tool-depends thing btw si another example for a stupid hack packages use to get the executable into PATH for the test suite) | 11:41:00 | |
| I do think it's worth looking into at some point down the line, just have a bunch of other cabal2nix/haskellPackages stuff on my queue already | 11:57:27 | |
| 9 Apr 2026 | ||
| 14:13:34 | ||
| Hi
Do I need to do anything special to apply patches to Haskell packages? Couldn't find anything relevant to my problem in the docs. | 14:18:02 | |
Oh, nvm - just realized I'm being stupid and should apply the patch to hledger-lib instead of hledger 🤦 | 14:19:14 | |
you also need to use the relative argument of fetchpatch so the paths are correct | 15:28:12 | |
| 10 Apr 2026 | ||
| 11:46:02 | ||
| 11 Apr 2026 | ||
| do we propagate buildToolDepends, testToolDepends, etc? I'm experimenting with allowing doCheck via canExecute (e.g. pkgsStatic) and running into a lot of things missing hspec-discover | 23:06:33 | |
| somehow it builds fine on native | 23:06:40 | |
I'm also wondering whether addTestToolDepend self.buildHaskellPackages.hspec-discover is what we should always door if there's a point to this (commented) conditional: https://github.com/NixOS/nixpkgs/blob/86ab6aea5099ecae02ef2331cfd3f1d53362f1db/pkgs/development/haskell-modules/configuration-common.nix#L1209 | 23:07:57 | |
| 12 Apr 2026 | ||
| I don’t think so. do you have some examples? I have a suspicion, but would need to check. | 07:41:57 | |