Haskell in Nixpkgs/NixOS | 717 Members | |
| For discussions and questions about Haskell with Nix, cabal2nix and haskellPackages in nixpkgs | Current Docs: https://haskell4nix.readthedocs.io/ | 143 Servers |
| Sender | Message | Time |
|---|---|---|
| 18 May 2025 | ||
| Thank you for the response, I'm currently trying this out. Each time I build it takes about 20 minutes, so I'll let you know how it goes in awhile. | 11:22:35 | |
| After an update, I've come up against another failure.
| 11:38:59 | |
| Here's the full trace. https://bpa.st/QC7A | 11:40:43 | |
| looks like the hard coded overrides are outdated in stacklock2nix https://github.com/cdepillabout/stacklock2nix/blob/108f6ab6d0208e3842443bea26dfd72b37d82f28/nix/build-support/stacklock2nix/cabal2nixArgsForPkg.nix#L128 | 13:23:56 | |
| Damn, alright. Guess I'll need a different approach. | 13:24:38 | |
| As is documented in that file you can pass your own overrides. | 13:25:42 | |
I assume somewhere in here yeah? This is my first time doing this. What would I put? | 13:33:55 | |
| it's documented here https://github.com/cdepillabout/stacklock2nix/blob/108f6ab6d0208e3842443bea26dfd72b37d82f28/nix/build-support/stacklock2nix/default.nix#L27-L31 | 13:41:21 | |
| Ok, that got me through the first couple errors. Now there's an infinite recursion. Not sure what to do about that. Here's what I'm working with: https://github.com/lamdu/lamdu/pull/241 Full Trace: https://bpa.st/GK4A | 14:42:39 | |
| Goddamn, I fix one thing and another thing gets broken. | 16:50:03 | |
| I think I got it! | 21:06:11 | |
| * I think found one that works! | 21:06:26 | |
| Just a few warnings to deal with!
| 21:08:04 | |
| 19 May 2025 | ||
| No idea how to deal with the warnings. | 01:38:52 | |
| Nevermind: https://github.com/input-output-hk/haskell.nix/issues/1157 I sure as hell don't know how to fix it, but there it is. | 01:53:31 | |
I think stacklock2nix internally calls cleanSourceWith. Maybe that's where this warning is coming from? Maybe the cleanSourceWith call needs to be passed a name argument? | 04:09:31 | |
I'm not sure about the GPL warning. Maybe one of the Haskell packages sets its license as GPL (instead of possibly GPL2 or GPL3 which would be correct), and cabal2nix or the haskell stuff in nixpkgs is giving a warning about it? You might be able to figure out where the warning is coming from by grepping through the Nixpkgs repo for something like license.*not found. | 04:11:37 | |
* I'm not sure about the GPL warning. Maybe one of the Haskell packages you transitively depend on sets its license as GPL (instead of possibly GPL2 or GPL3 which would be correct), and cabal2nix or the haskell stuff in nixpkgs is giving a warning about it? You might be able to figure out where the warning is coming from by grepping through the Nixpkgs repo for something like license.*not found. | 04:12:05 | |
| Sorry, I should've made it clear, I never got it working with stacklock2nix. I used haskell.nix instead. | 07:34:18 | |
| 10:59:23 | ||
| 11:01:07 | ||
| How do I include haddock output in my package build using flake.nix? Seems it's removed in the nix store path logged during build | 19:22:16 | |
| I don’t think that should be the case. | 19:41:39 | |
But there is a flag to a Haskell derivation which is called doHaddocks. | 19:42:29 | |
| Pretty sure that’s documented in the nixpkgs manual if you wanna take a look. | 19:42:49 | |
| Oh, wait. | 19:44:03 | |
| Sorry | 19:44:06 | |
There is a separate -doc output as result of the build. | 19:44:30 | |
| here's the flake.nix for reference https://paste.tomsmeding.com/R55viFJM | 19:45:00 | |
So if you build your package with .#foo then something like .#foo.doc should, I think, give you a store path with the docs. | 19:45:28 | |