docs: enable on darwin

Now that sandbox issue has been fixed in nix. We can compile and serve
docs.
This commit is contained in:
Austin Horstman 2025-06-23 21:34:27 -05:00
parent 175b7a47de
commit 708c601e0d

View file

@ -100,9 +100,7 @@ let
}).optionsJSON; }).optionsJSON;
in in
lib.fix ( lib.fix (self: {
self:
{
inherit options-json; inherit options-json;
inherit (pkgs) nixos-render-docs; inherit (pkgs) nixos-render-docs;
@ -116,9 +114,7 @@ lib.fix (
lib-docs = pkgs.callPackage ./lib { lib-docs = pkgs.callPackage ./lib {
inherit nixvim lib; inherit nixvim lib;
}; };
}
// lib.optionalAttrs (!pkgs.stdenv.isDarwin) {
# NuschtOS/search does not seem to work on darwin
search = nuschtosSearch.packages.mkSearch { search = nuschtosSearch.packages.mkSearch {
optionsJSON = options-json + "/share/doc/nixos/options.json"; optionsJSON = options-json + "/share/doc/nixos/options.json";
urlPrefix = "https://github.com/nix-community/nixvim/tree/main"; urlPrefix = "https://github.com/nix-community/nixvim/tree/main";
@ -126,8 +122,6 @@ lib.fix (
baseHref = "/"; baseHref = "/";
}; };
# Do not check if documentation builds fine on darwin as it fails:
# > sandbox-exec: pattern serialization length 69298 exceeds maximum (65535)
docs = pkgs.callPackage ./mdbook { docs = pkgs.callPackage ./mdbook {
inherit evaledModules transformOptions; inherit evaledModules transformOptions;
inherit (self) search lib-docs; inherit (self) search lib-docs;
@ -136,5 +130,4 @@ lib.fix (
serve-docs = pkgs.callPackage ./server { serve-docs = pkgs.callPackage ./server {
inherit (self) docs; inherit (self) docs;
}; };
} })
)