2018-12-18 17:09:56 +00:00
|
|
|
{ pkgs }:
|
2018-05-06 20:14:50 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
|
2018-12-18 17:09:56 +00:00
|
|
|
lib = pkgs.lib;
|
2018-05-06 20:14:50 +00:00
|
|
|
|
2018-12-18 17:09:56 +00:00
|
|
|
nmdSrc = pkgs.fetchFromGitLab {
|
2019-08-28 18:36:11 +00:00
|
|
|
name = "nmd";
|
2018-12-18 17:09:56 +00:00
|
|
|
owner = "rycee";
|
|
|
|
repo = "nmd";
|
2019-08-27 21:40:52 +00:00
|
|
|
rev = "9751ca5ef6eb2ef27470010208d4c0a20e89443d";
|
|
|
|
sha256 = "0rbx10n8kk0bvp1nl5c8q79lz1w0p1b8103asbvwps3gmqd070hi";
|
2018-12-18 17:09:56 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nmd = import nmdSrc { inherit pkgs; };
|
|
|
|
|
2019-08-27 21:40:52 +00:00
|
|
|
# Make sure the used package is scrubbed to avoid actually
|
|
|
|
# instantiating derivations.
|
|
|
|
scrubbedPkgsModule = {
|
|
|
|
imports = [
|
|
|
|
{
|
|
|
|
_module.args = {
|
|
|
|
pkgs = lib.mkForce (nmd.scrubDerivations "pkgs" pkgs);
|
|
|
|
pkgs_i686 = lib.mkForce { };
|
|
|
|
};
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2018-12-18 17:09:56 +00:00
|
|
|
hmModulesDocs = nmd.buildModulesDocs {
|
2019-08-27 21:40:52 +00:00
|
|
|
modules =
|
|
|
|
import ../modules/modules.nix { inherit lib pkgs; }
|
|
|
|
++ [ scrubbedPkgsModule ];
|
2018-12-18 17:09:56 +00:00
|
|
|
moduleRootPaths = [ ./.. ];
|
|
|
|
mkModuleUrl = path:
|
|
|
|
"https://github.com/rycee/home-manager/blob/master/${path}#blob-path";
|
|
|
|
channelName = "home-manager";
|
|
|
|
docBook.id = "home-manager-options";
|
|
|
|
};
|
|
|
|
|
|
|
|
docs = nmd.buildDocBookDocs {
|
|
|
|
pathName = "home-manager";
|
|
|
|
modulesDocs = [ hmModulesDocs ];
|
|
|
|
documentsDirectory = ./.;
|
|
|
|
chunkToc = ''
|
|
|
|
<toc>
|
2018-05-06 20:14:50 +00:00
|
|
|
<d:tocentry xmlns:d="http://docbook.org/ns/docbook" linkend="book-home-manager-manual"><?dbhtml filename="index.html"?>
|
|
|
|
<d:tocentry linkend="ch-options"><?dbhtml filename="options.html"?></d:tocentry>
|
2019-06-08 23:47:43 +00:00
|
|
|
<d:tocentry linkend="ch-tools"><?dbhtml filename="tools.html"?></d:tocentry>
|
2019-01-20 16:38:34 +00:00
|
|
|
<d:tocentry linkend="ch-release-notes"><?dbhtml filename="release-notes.html"?></d:tocentry>
|
2018-05-06 20:14:50 +00:00
|
|
|
</d:tocentry>
|
|
|
|
</toc>
|
|
|
|
'';
|
2018-12-18 17:09:56 +00:00
|
|
|
};
|
2018-05-06 20:14:50 +00:00
|
|
|
|
2018-12-18 17:09:56 +00:00
|
|
|
in
|
2018-05-06 20:14:50 +00:00
|
|
|
|
2018-12-18 17:09:56 +00:00
|
|
|
{
|
2019-08-28 18:36:11 +00:00
|
|
|
inherit nmdSrc;
|
2018-05-06 20:14:50 +00:00
|
|
|
|
2018-12-18 17:09:56 +00:00
|
|
|
options = {
|
|
|
|
json = hmModulesDocs.json.override {
|
|
|
|
path = "share/doc/home-manager/options.json";
|
|
|
|
};
|
|
|
|
};
|
2018-05-06 20:14:50 +00:00
|
|
|
|
2018-12-18 17:09:56 +00:00
|
|
|
manPages = docs.manPages;
|
2018-05-06 20:14:50 +00:00
|
|
|
|
2018-12-18 17:09:56 +00:00
|
|
|
manual = {
|
|
|
|
inherit (docs) html htmlOpenTool;
|
|
|
|
};
|
2018-05-06 20:14:50 +00:00
|
|
|
}
|