mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-30 23:55:15 +02:00
docs: refactor wrapper-options docs
This commit is contained in:
parent
5992a22821
commit
0562e519ec
6 changed files with 54 additions and 19 deletions
|
@ -4,7 +4,6 @@
|
|||
evaledModules,
|
||||
nixosOptionsDoc,
|
||||
transformOptions,
|
||||
hmOptions,
|
||||
search,
|
||||
}:
|
||||
let
|
||||
|
@ -227,6 +226,29 @@ let
|
|||
) docs.modules;
|
||||
};
|
||||
|
||||
wrapperOptions =
|
||||
lib.genAttrs
|
||||
[
|
||||
"hm"
|
||||
"nixos"
|
||||
"darwin"
|
||||
]
|
||||
(
|
||||
name:
|
||||
let
|
||||
configuration = lib.evalModules {
|
||||
modules = [
|
||||
../../wrappers/modules/${name}.nix
|
||||
{
|
||||
# Ignore definitions for missing options
|
||||
_module.check = false;
|
||||
}
|
||||
];
|
||||
};
|
||||
in
|
||||
removeUnwanted configuration.options
|
||||
);
|
||||
|
||||
prepareMD = ''
|
||||
# Copy inputs into the build directory
|
||||
cp -r --no-preserve=all $inputs/* ./
|
||||
|
@ -243,8 +265,10 @@ let
|
|||
substituteInPlace ./SUMMARY.md \
|
||||
--replace-fail "@NIXVIM_OPTIONS@" "$(cat ${pkgs.writeText "nixvim-options-summary.md" mdbook.nixvimOptions})"
|
||||
|
||||
substituteInPlace ./modules/hm.md \
|
||||
--replace-fail "@HM_OPTIONS@" "$(cat ${mkMDDoc hmOptions})"
|
||||
substituteInPlace ./modules/wrapper-options.md \
|
||||
--replace-fail "@NIXOS_OPTIONS@" "$(cat ${mkMDDoc wrapperOptions.nixos})" \
|
||||
--replace-fail "@HM_OPTIONS@" "$(cat ${mkMDDoc wrapperOptions.hm})" \
|
||||
--replace-fail "@DARWIN_OPTIONS@" "$(cat ${mkMDDoc wrapperOptions.darwin})"
|
||||
'';
|
||||
in
|
||||
pkgs.stdenv.mkDerivation {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue