diff options
Diffstat (limited to 'modules/documentation/default.nix')
| -rw-r--r-- | modules/documentation/default.nix | 51 |
1 files changed, 42 insertions, 9 deletions
diff --git a/modules/documentation/default.nix b/modules/documentation/default.nix index 6bd3412..a49d277 100644 --- a/modules/documentation/default.nix +++ b/modules/documentation/default.nix @@ -21,10 +21,11 @@ let It isn't perfect, but it seems to cover a vast majority of use cases. Caveat: even if the package is reached by a different means, the path above will be shown and not e.g. `${config.services.foo.package}`. */ - manual = import ../../doc/manual rec { + realManual = import ../../doc/manual { inherit pkgs config; version = config.system.darwinVersion; revision = config.system.darwinRevision; + nixpkgsRevision = config.system.nixpkgsRevision; options = let scrubbedEval = evalModules { @@ -43,6 +44,38 @@ let in scrubbedEval.options; }; + # TODO: Remove this when dropping 22.11 support. + manual = realManual // + lib.optionalAttrs (lib.versionOlder lib.version "23.05-pre") rec { + optionsJSON = pkgs.writeTextFile { + name = "options.json-stub"; + destination = "/share/doc/darwin/options.json"; + text = "{}"; + }; + manpages = pkgs.writeTextFile { + name = "darwin-manpages-stub"; + destination = "/share/man/man5/configuration.nix.5"; + text = '' + .TH "CONFIGURATION\&.NIX" "5" "01/01/1980" "Darwin" "Darwin Reference Pages" + .SH "NAME" + \fIconfiguration\&.nix\fP \- Darwin system configuration specification + .SH "DESCRIPTION" + .PP + The nix\-darwin documentation now requires nixpkgs 23.05 to build. + ''; + }; + manualHTML = pkgs.writeTextFile { + name = "darwin-manual-html-stub"; + destination = "/share/doc/darwin/index.html"; + text = '' + <!DOCTYPE html> + <title>Darwin Configuration Options</title> + The nix-darwin documentation now requires nixpkgs 23.05 to build. + ''; + }; + manualHTMLIndex = "${manualHTML}/share/doc/darwin/index.html"; + }; + helpScript = pkgs.writeScriptBin "darwin-help" '' #! ${pkgs.stdenv.shell} -e @@ -55,9 +88,9 @@ in documentation.enable = mkOption { type = types.bool; default = true; - description = '' + description = lib.mdDoc '' Whether to install documentation of packages from - <option>environment.systemPackages</option> into the generated system path. + {option}`environment.systemPackages` into the generated system path. See "Multiple-output packages" chapter in the nixpkgs manual for more info. ''; @@ -67,8 +100,8 @@ in documentation.man.enable = mkOption { type = types.bool; default = true; - description = '' - Whether to install manual pages and the <command>man</command> command. + description = lib.mdDoc '' + Whether to install manual pages and the {command}`man` command. This also includes "man" outputs. ''; }; @@ -76,8 +109,8 @@ in documentation.info.enable = mkOption { type = types.bool; default = true; - description = '' - Whether to install info pages and the <command>info</command> command. + description = lib.mdDoc '' + Whether to install info pages and the {command}`info` command. This also includes "info" outputs. ''; }; @@ -85,8 +118,8 @@ in documentation.doc.enable = mkOption { type = types.bool; default = true; - description = '' - Whether to install documentation distributed in packages' <literal>/share/doc</literal>. + description = lib.mdDoc '' + Whether to install documentation distributed in packages' `/share/doc`. Usually plain text and/or HTML. This also includes "doc" outputs. ''; |
