2020-06-06 22:08:02 +02:00
|
|
|
{ pkgs
|
|
|
|
|
2020-02-02 00:39:17 +01:00
|
|
|
# Note, this should be "the standard library" + HM extensions.
|
2020-06-06 22:08:02 +02:00
|
|
|
, lib ? import ../modules/lib/stdlib-extended.nix pkgs.lib }:
|
2018-05-06 22:14:50 +02:00
|
|
|
|
|
|
|
let
|
|
|
|
|
2018-12-18 18:09:56 +01:00
|
|
|
nmdSrc = pkgs.fetchFromGitLab {
|
2019-08-28 20:36:11 +02:00
|
|
|
name = "nmd";
|
2018-12-18 18:09:56 +01:00
|
|
|
owner = "rycee";
|
|
|
|
repo = "nmd";
|
2020-06-06 14:10:14 +02:00
|
|
|
rev = "2398aa79ab12aa7aba14bc3b08a6efd38ebabdc5";
|
|
|
|
sha256 = "0yxb48afvccn8vvpkykzcr4q1rgv8jsijqncia7a5ffzshcrwrnh";
|
2018-12-18 18:09:56 +01:00
|
|
|
};
|
|
|
|
|
2020-01-16 23:41:14 +01:00
|
|
|
nmd = import nmdSrc { inherit lib pkgs; };
|
2018-12-18 18:09:56 +01:00
|
|
|
|
2019-08-27 23:40:52 +02:00
|
|
|
# Make sure the used package is scrubbed to avoid actually
|
|
|
|
# instantiating derivations.
|
|
|
|
scrubbedPkgsModule = {
|
2020-02-02 00:39:17 +01:00
|
|
|
imports = [{
|
|
|
|
_module.args = {
|
|
|
|
pkgs = lib.mkForce (nmd.scrubDerivations "pkgs" pkgs);
|
|
|
|
pkgs_i686 = lib.mkForce { };
|
|
|
|
};
|
|
|
|
}];
|
2019-08-27 23:40:52 +02:00
|
|
|
};
|
|
|
|
|
2018-12-18 18:09:56 +01:00
|
|
|
hmModulesDocs = nmd.buildModulesDocs {
|
2020-02-02 00:39:17 +01:00
|
|
|
modules = import ../modules/modules.nix {
|
|
|
|
inherit lib pkgs;
|
|
|
|
check = false;
|
|
|
|
} ++ [ scrubbedPkgsModule ];
|
2018-12-18 18:09:56 +01:00
|
|
|
moduleRootPaths = [ ./.. ];
|
|
|
|
mkModuleUrl = path:
|
2020-10-19 21:20:37 +02:00
|
|
|
"https://github.com/nix-community/home-manager/blob/master/${path}#blob-path";
|
2018-12-18 18:09:56 +01:00
|
|
|
channelName = "home-manager";
|
|
|
|
docBook.id = "home-manager-options";
|
|
|
|
};
|
|
|
|
|
|
|
|
docs = nmd.buildDocBookDocs {
|
|
|
|
pathName = "home-manager";
|
|
|
|
modulesDocs = [ hmModulesDocs ];
|
|
|
|
documentsDirectory = ./.;
|
2020-04-19 11:53:31 +02:00
|
|
|
documentType = "book";
|
2018-12-18 18:09:56 +01:00
|
|
|
chunkToc = ''
|
|
|
|
<toc>
|
2018-05-06 22:14:50 +02: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-09 01:47:43 +02:00
|
|
|
<d:tocentry linkend="ch-tools"><?dbhtml filename="tools.html"?></d:tocentry>
|
2019-01-20 17:38:34 +01:00
|
|
|
<d:tocentry linkend="ch-release-notes"><?dbhtml filename="release-notes.html"?></d:tocentry>
|
2018-05-06 22:14:50 +02:00
|
|
|
</d:tocentry>
|
|
|
|
</toc>
|
|
|
|
'';
|
2018-12-18 18:09:56 +01:00
|
|
|
};
|
2018-05-06 22:14:50 +02:00
|
|
|
|
2020-02-02 00:39:17 +01:00
|
|
|
in {
|
2019-08-28 20:36:11 +02:00
|
|
|
inherit nmdSrc;
|
2018-05-06 22:14:50 +02:00
|
|
|
|
2018-12-18 18:09:56 +01:00
|
|
|
options = {
|
|
|
|
json = hmModulesDocs.json.override {
|
|
|
|
path = "share/doc/home-manager/options.json";
|
|
|
|
};
|
|
|
|
};
|
2018-05-06 22:14:50 +02:00
|
|
|
|
2018-12-18 18:09:56 +01:00
|
|
|
manPages = docs.manPages;
|
2018-05-06 22:14:50 +02:00
|
|
|
|
2020-02-02 00:39:17 +01:00
|
|
|
manual = { inherit (docs) html htmlOpenTool; };
|
2018-05-06 22:14:50 +02:00
|
|
|
}
|