mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-09 16:54:36 +02:00
docs/search: refactor to use override
This commit is contained in:
parent
9eb07bb16f
commit
cdbda982f0
2 changed files with 25 additions and 27 deletions
|
@ -50,35 +50,30 @@ let
|
|||
}).optionsJSON;
|
||||
|
||||
in
|
||||
{
|
||||
inherit options-json;
|
||||
inherit (pkgs) nixos-render-docs;
|
||||
|
||||
gfm-alerts-to-admonitions = pkgs.python3.pkgs.callPackage ./gfm-alerts-to-admonitions { };
|
||||
|
||||
man-docs = pkgs.callPackage ./man { inherit options-json; };
|
||||
}
|
||||
// lib.optionalAttrs (!pkgs.stdenv.isDarwin) (
|
||||
let
|
||||
mkSearch =
|
||||
baseHref:
|
||||
nuschtosSearch.packages.mkSearch {
|
||||
optionsJSON = options-json + "/share/doc/nixos/options.json";
|
||||
urlPrefix = "https://github.com/nix-community/nixvim/tree/main";
|
||||
title = "Nixvim options search";
|
||||
inherit baseHref;
|
||||
};
|
||||
in
|
||||
lib.fix (
|
||||
self:
|
||||
{
|
||||
inherit options-json;
|
||||
inherit (pkgs) nixos-render-docs;
|
||||
|
||||
gfm-alerts-to-admonitions = pkgs.python3.pkgs.callPackage ./gfm-alerts-to-admonitions { };
|
||||
|
||||
man-docs = pkgs.callPackage ./man { inherit options-json; };
|
||||
}
|
||||
// lib.optionalAttrs (!pkgs.stdenv.isDarwin) {
|
||||
# NuschtOS/search does not seem to work on darwin
|
||||
search = mkSearch "/";
|
||||
search = nuschtosSearch.packages.mkSearch {
|
||||
optionsJSON = options-json + "/share/doc/nixos/options.json";
|
||||
urlPrefix = "https://github.com/nix-community/nixvim/tree/main";
|
||||
title = "Nixvim options search";
|
||||
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 {
|
||||
inherit evaledModules transformOptions;
|
||||
# TODO: Find how to handle stable when 24.11 lands
|
||||
search = mkSearch "/nixvim/search/";
|
||||
inherit (self) search;
|
||||
};
|
||||
}
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue