!RbXGJhHMsnQcNIDFWN:nixos.org

Haskell in Nixpkgs/NixOS

725 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.org145 Servers

Load older messages


SenderMessageTime
19 May 2025
@keypusher:matrix.orgkeypusherhere's the flake.nix for reference https://paste.tomsmeding.com/R55viFJM19:45:00
@maralorn:maralorn.demaralorn 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:matrix.orgkeypusherok.. ill try that19:46:07
@maralorn:maralorn.demaralornHuh, your flake seems to be pretty aware of that. 😄19:46:50
@maralorn:maralorn.demaralorn Although I didn’t know docs is a bespoke flake attribute. 19:47:15
@keypusher:matrix.orgkeypusherit might be faulty. I just discovered "myPackageWithDocs" does not have a doc attribute19:47:59
@maralorn:maralorn.demaralorn btw. you shouldn’t use overrideAttrs on a haskell packages. Rather use the pkgs.haskell.lib.overideCabal function. 19:48:46
@keypusher:matrix.orgkeypusherokok19:48:58
@keypusher:matrix.orgkeypusher doesn't that apply the settings to all of pkgs.haskell.lib ? 19:49:55
@maralorn:maralorn.demaralorn 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:maralorn.demaralorn * 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:maralorn.demaralornYet, 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:matrix.orgkeypusherSeems I cannon find the correct attribute to refer to the documentation of the package.19:55:02
@keypusher:matrix.orgkeypushernone of doc/docs/documentation seems to do it19:55:23
@maralorn:maralorn.demaralorn When I build e.g. nixpkgs#haskellPackages.aeson.doc I get the docs in a symlink called result-doc. 19:57:31
@keypusher:matrix.orgkeypusherah ok19:58:58
@maralorn:maralorn.demaralornFound them?19:59:31
@keypusher:matrix.orgkeypusher 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:maralorn.demaralorn And if you build nix build .#default.doc? 20:05:17
@keypusher:matrix.orgkeypusherI'll try after i adopt the change about overrideCabal you proposed.20:06:12
@maralorn:maralorn.demaralorn Alternatively there is this absurd syntax: nix build '.#default^*' which will build all outputs. 20:06:50
@keypusher:matrix.orgkeypusherhehe. Worth a try 20:07:09
@keypusher:matrix.orgkeypusher tried nix build --impure --print-build-logs .#default.doc 20:09:41
@keypusher:matrix.orgkeypusher It produced a result-doc symlink... but the folder was empty 20:10:05
@maralorn:maralorn.demaralornheh20:12:09
@keypusher:matrix.orgkeypusherMaybe the problem isn't a nix one but that i haven't configured haddock properly?! I have to confess I rarely produce docs. 20:12:55
@maralorn:maralorn.demaralorn Just to be sure can you do readlink result-doc? 20:13:08
@maralorn:maralorn.demaralornIt seems to be something like that, but you normally don’t have to do anything to have haddocks enabled.20:13:54
@maralorn:maralorn.demaralornWhich plattform are you on?20:14:03
@maralorn:maralorn.demaralorn* Which platform are you on?20:14:08

Show newer messages


Back to Room ListRoom Version: 6