| 19 May 2025 |
wildwestrom | Sorry, I should've made it clear, I never got it working with stacklock2nix. I used haskell.nix instead. | 07:34:18 |
| oak 🏳️🌈♥️ changed their display name from oak 🫱⭕🫲 to oak. | 10:59:23 |
| oak 🏳️🌈♥️ changed their display name from oak to oak 🏳️🌈♥️. | 11:01:07 |
keypusher | 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 |
maralorn | I don’t think that should be the case. | 19:41:39 |
maralorn | But there is a flag to a Haskell derivation which is called doHaddocks. | 19:42:29 |
maralorn | Pretty sure that’s documented in the nixpkgs manual if you wanna take a look. | 19:42:49 |
maralorn | Oh, wait. | 19:44:03 |
maralorn | Sorry | 19:44:06 |
maralorn | There is a separate -doc output as result of the build. | 19:44:30 |
keypusher | here's the flake.nix for reference https://paste.tomsmeding.com/R55viFJM | 19:45:00 |
maralorn | 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 |
keypusher | ok.. ill try that | 19:46:07 |
maralorn | Huh, your flake seems to be pretty aware of that. 😄 | 19:46:50 |
maralorn | Although I didn’t know docs is a bespoke flake attribute. | 19:47:15 |
keypusher | it might be faulty. I just discovered "myPackageWithDocs" does not have a doc attribute | 19:47:59 |
maralorn | btw. you shouldn’t use overrideAttrs on a haskell packages. Rather use the pkgs.haskell.lib.overideCabal function. | 19:48:46 |
keypusher | okok | 19:48:58 |
keypusher | doesn't that apply the settings to all of pkgs.haskell.lib ? | 19:49:55 |
maralorn | Uh, no. You have to think of it more like a function, less than a method. So you would use it like pkgs.haskell.lib.overrideCabal <yourPackage> (old: { <your override>}). | 19:51:11 |
maralorn | * Uh, no. You have to think of it more like a function, less than a method. So you would use it like yourChangedPackage = pkgs.haskell.lib.overrideCabal <yourPackage> (old: { <your override>}). | 19:51:34 |
maralorn | Yet, the both options you set are both on by default, so I don’t think you need the override at all. | 19:52:02 |
keypusher | Seems I cannon find the correct attribute to refer to the documentation of the package. | 19:55:02 |
keypusher | none of doc/docs/documentation seems to do it | 19:55:23 |
maralorn | When I build e.g. nixpkgs#haskellPackages.aeson.doc I get the docs in a symlink called result-doc. | 19:57:31 |
keypusher | ah ok | 19:58:58 |
maralorn | Found them? | 19:59:31 |
keypusher | I build with nix flake build and the only output I get is the result symlink that countains lib and bin | 20:01:28 |
maralorn | And if you build nix build .#default.doc? | 20:05:17 |
keypusher | I'll try after i adopt the change about overrideCabal you proposed. | 20:06:12 |