diff options
author | Martin Weinelt <hexa@darmstadt.ccc.de> | 2024-06-15 22:41:34 +0200 |
---|---|---|
committer | Martin Weinelt <hexa@darmstadt.ccc.de> | 2024-06-15 22:41:34 +0200 |
commit | 22eb340fafec89b7879297de967e9b620b767d28 (patch) | |
tree | f5aa974eada75f19459048a91279acf791268c6e /doc | |
parent | 59ab667c16f63dc4a506d088f000ed2042e3493e (diff) | |
parent | 574887d121eecd21a8f9da9a7280b3a1b5cbf487 (diff) |
Merge remote-tracking branch 'origin/staging-next' into staging
Conflicts: - pkgs/development/python-modules/fastembed/default.nix
Diffstat (limited to 'doc')
-rw-r--r-- | doc/default.nix | 29 | ||||
-rw-r--r-- | doc/functions/library/.gitkeep | 0 |
2 files changed, 20 insertions, 9 deletions
diff --git a/doc/default.nix b/doc/default.nix index 14c828b02a061..fd623cf15b8c8 100644 --- a/doc/default.nix +++ b/doc/default.nix @@ -2,6 +2,7 @@ let inherit (pkgs) lib; inherit (lib) hasPrefix removePrefix; + fs = lib.fileset; common = import ./common.nix; @@ -99,20 +100,30 @@ in pkgs.stdenv.mkDerivation { nixos-render-docs ]; - src = ./.; + src = fs.toSource { + root = ./.; + fileset = fs.unions [ + (fs.fileFilter (file: + file.hasExt "md" + || file.hasExt "md.in" + ) ./.) + ./style.css + ./anchor-use.js + ./anchor.min.js + ./manpage-urls.json + ]; + }; postPatch = '' ln -s ${optionsDoc.optionsJSON}/share/doc/nixos/options.json ./config-options.json ''; - buildPhase = let - pythonInterpreterTable = pkgs.callPackage ./doc-support/python-interpreter-table.nix {}; - pythonSection = with lib.strings; replaceStrings - [ "@python-interpreter-table@" ] - [ pythonInterpreterTable ] - (readFile ./languages-frameworks/python.section.md); - in '' - cp ${builtins.toFile "python.section.md" pythonSection} ./languages-frameworks/python.section.md + pythonInterpreterTable = pkgs.callPackage ./doc-support/python-interpreter-table.nix {}; + + passAsFile = [ "pythonInterpreterTable" ]; + + buildPhase = '' + substituteInPlace ./languages-frameworks/python.section.md --subst-var-by python-interpreter-table "$(<"$pythonInterpreterTablePath")" cat \ ./functions/library.md.in \ diff --git a/doc/functions/library/.gitkeep b/doc/functions/library/.gitkeep deleted file mode 100644 index e69de29bb2d1d..0000000000000 --- a/doc/functions/library/.gitkeep +++ /dev/null |