docs: Correctly generate documentation for types either a (submodule ...) (#929)

This requires pulling quite a lot of code from nixpkgs in order to
make the `either` type work correctly, the effects can be seen for
example in the documentation of `ollama.promps` and `ollama.actions`
This commit is contained in:
traxys 2024-01-12 23:22:03 +01:00 committed by GitHub
parent 61da581315
commit 29225c2797
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 509 additions and 308 deletions

View file

@ -1,27 +1,14 @@
{
perSystem = {
pkgs,
pkgsUnfree,
config,
modules,
...
}: {
packages = let
# Do not check if documentation builds fine on darwin as it fails:
# > sandbox-exec: pattern serialization length 69298 exceeds maximum (65535)
docs = pkgs.lib.optionalAttrs (!pkgs.stdenv.isDarwin) {
docs = pkgsUnfree.callPackage (import ../docs) {
inherit modules;
};
};
man-docs = import ../man-docs {
pkgs = pkgsUnfree;
inherit modules;
};
in
docs
// man-docs;
packages = import ../docs {
inherit modules pkgs;
inherit (pkgs) lib;
};
# Test that all packages build fine when running `nix flake check`.
checks = config.packages;