docs: patch nixos-render-docs to output GFM alerts

This does not add support for _using_ GFM syntax alerts, the nixpkgs
syntax must still be used in option descriptions for now.
This commit is contained in:
Matt Sturgeon 2024-09-10 16:14:11 +01:00
parent 79010edc14
commit d0c0821245
No known key found for this signature in database
GPG key ID: 4F91844CED1A8299
2 changed files with 63 additions and 3 deletions

View file

@ -31,9 +31,21 @@ let
}
);
pkgsDoc = pkgs // {
inherit lib;
};
# Extended nixpkgs instance, with patches to nixos-render-docs
pkgsDoc = pkgs.extend (
final: prev: {
inherit lib;
nixos-render-docs = prev.nixos-render-docs.overrideAttrs (old: {
patches = old.patches or [ ] ++ [
# Adds support for GFM-style admonitions in rendered commonmark
./0001-Output-GFM-admonition.patch
# TODO:add support for _parsing_ GFM admonitions too
# https://github.com/nix-community/nixvim/issues/2217
];
});
}
);
helpers = import ../lib/helpers.nix {
inherit lib;