Haskell in Nixpkgs/NixOS | 694 Members | |
| For discussions and questions about Haskell with Nix, cabal2nix and haskellPackages in nixpkgs | Current Docs: https://haskell4nix.readthedocs.io/ | 137 Servers |
| Sender | Message | Time |
|---|---|---|
| 15 Sep 2025 | ||
Only the last one failed with 'error: function 'anonymous lambda' called without required argument 'testu01'' | 15:02:33 | |
| Here is the reproducer https://github.com/bglgwyng/haskellPackages-override | 15:02:59 | |
*
Only the last one failed with | 15:03:21 | |
I can see testu01 in the arguments of cabal2nix-splitmix, but somehow the override failed. | 15:04:08 | |
| I have a hard time getting protoc (on the PATH) while building a package with callCabal2Nix. It's used by cabal extension. | 15:20:20 | |
| Are there any tricks to troubleshooting that? | 15:21:06 | |
keypusher: cabal2nix does not really have the ability to do that automatically since Cabal does not allow specifying a dependency on a build tool that is not itself a Cabal package. You need to use addBuildTools or the like from haskell.lib.compose. | 15:32:07 | |
bglgwyng: on what system does packages.splitmix2 fail to evaluate? | 15:36:34 | |
| Oh ok. I tried googling "haskell.lib.compose addBuildtools" but came up a bit short. You don't happen to have some useful url? | 15:37:31 | |
| thanks btw! | 15:37:53 | |
bglgwyng: the testu01 test suite is only buildable on linux, Cabal discards this dependency on non-linux, you can force the platform to use with e.g. --system x86_64-linux | 15:38:40 | |
| keypusher: https://nixos.org/manual/nixpkgs/stable/#haskell-trivial-helpers | 15:39:11 | |
| it's x86_64-linux | 15:52:22 | |
| I haven't trie don the other platforms | 15:53:24 | |
|
So this looks fine. | 15:54:59 | |
| ahh now I understand the issue. | 15:56:50 | |
| The problem with override is that it depends on initially computing the derivation successfully. This doesn't work if an argument is missing which is the case here with
| 15:59:14 | |
| Ah I see | 16:06:43 | |
| Thanks! | 16:06:46 | |
One thing annoying is that I can investigate the argments with builtins.functionArgs (pkgs.callCabal2nix name src) | 16:13:54 | |
| Maybe it's because wrapped? I think I can find how to fix it | 16:14:12 | |
| So going the addBuildTools route will require me to build wo using callCabal2Nix then? | 16:19:31 | |
| I am missing a bit of context, but I don’t think so. Both functions are compatible. First call callCabal2Nix then apply addBuildTools to the result of the function. | 16:33:23 | |
| Oh ok. I'll try that | 16:34:22 | |
| You made my day. 4 hours of struggling just came to an end. My nix intuition is lacking. | 16:36:43 | |
| Thanks 🎉 | 16:37:15 | |
| I noticed that, too, yesterday, I think this is a bug and is probably fixable | 17:43:17 | |
In reply to @sternenseemann:systemli.orgNot sure which branch to PR to. I assume haskell-updates is the best choice?(Hugs fix without GCC 13 is ready.) | 22:37:00 | |
| can also be master if you don’t depend on anything in h-u | 22:47:03 | |
| Even for the mhs package set? | 22:48:00 | |