update nixpkgs-manual

This commit is contained in:
Pyrox 2024-07-08 12:00:30 -04:00
parent aa209a9154
commit a16880d91d
Signed by untrusted user: pyrox
GPG key ID: 8CDF3F7CAA53A0F5
2 changed files with 2 additions and 12 deletions

View file

@ -37,7 +37,7 @@ let
) opt.declarations; ) opt.declarations;
}; };
}; };
optionsJSONFile = "${optionsDoc.optionsJSON}/share/doc/nixos/options.json"; optionsMD = optionsDoc.optionsCommonMark;
in in
stdenvNoCC.mkDerivation { stdenvNoCC.mkDerivation {
name = "nixpkgs-manual-md"; name = "nixpkgs-manual-md";
@ -59,11 +59,6 @@ stdenvNoCC.mkDerivation {
passAsFile = [ "pythonInterpreterTable" ]; passAsFile = [ "pythonInterpreterTable" ];
buildPhase = '' buildPhase = ''
nixos-render-docs -j $NIX_BUILD_CORES options commonmark \
--manpage-urls ./manpage-urls.json \
--revision ${inputs.nixpkgs.rev} \
${optionsJSONFile} ./options.md
substituteInPlace ./languages-frameworks/python.section.md --subst-var-by python-interpreter-table "$(<"$pythonInterpreterTablePath")" substituteInPlace ./languages-frameworks/python.section.md --subst-var-by python-interpreter-table "$(<"$pythonInterpreterTablePath")"
mv ./functions/library.md.in ./functions/library.md mv ./functions/library.md.in ./functions/library.md
@ -71,8 +66,8 @@ stdenvNoCC.mkDerivation {
--replace-fail '@MANUAL_VERSION@' '${lib.version}' --replace-fail '@MANUAL_VERSION@' '${lib.version}'
mkdir out mkdir out
cp ${optionsMD} out/options.md
mv preface.chapter.md out/index.md mv preface.chapter.md out/index.md
mv options.md out/
mv build-helpers out/build-helpers mv build-helpers out/build-helpers
mv build-helpers.md out/build-helpers/index.md mv build-helpers.md out/build-helpers/index.md
mv development out/development mv development out/development
@ -89,7 +84,6 @@ stdenvNoCC.mkDerivation {
mv stdenv.md out/stdenv/index.md mv stdenv.md out/stdenv/index.md
mv using out/using-nixpkgs mv using out/using-nixpkgs
mv using-nixpkgs.md out/using-nixpkgs/index.md mv using-nixpkgs.md out/using-nixpkgs/index.md
cp ${optionsJSONFile} out/options.json
pushd out pushd out
find . -type f -exec perl -pi -e 's/\s*:::{.note}\n/!!! note\n\ \ /' {} \; find . -type f -exec perl -pi -e 's/\s*:::{.note}\n/!!! note\n\ \ /' {} \;
find . -type f -exec perl -pi -e 's/\s*:::{.warning}\n/!!! warning\n\ \ /' {} \; find . -type f -exec perl -pi -e 's/\s*:::{.warning}\n/!!! warning\n\ \ /' {} \;

View file

@ -1,4 +0,0 @@
{ pkgs, inputs, ... }:
let
inherit (pkgs.lib) hasPrefix removePrefix;
in