diff options
-rw-r--r-- | mdbook.nix | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -17,6 +17,24 @@ in | |||
17 | ''; | 17 | ''; |
18 | internal = optionsInternal; | 18 | internal = optionsInternal; |
19 | }; | 19 | }; |
20 | |||
21 | preBuild = mkOption { | ||
22 | type = types.lines; | ||
23 | description = '' | ||
24 | Extra commands executed before running `mdbook build`. | ||
25 | ''; | ||
26 | default = ""; | ||
27 | internal = optionsInternal; | ||
28 | }; | ||
29 | |||
30 | postBuild = mkOption { | ||
31 | type = types.lines; | ||
32 | description = '' | ||
33 | Extra commands executed after running `mdbook build`. | ||
34 | ''; | ||
35 | default = ""; | ||
36 | internal = optionsInternal; | ||
37 | }; | ||
20 | }; | 38 | }; |
21 | }; | 39 | }; |
22 | 40 | ||
@@ -37,8 +55,12 @@ in | |||
37 | 55 | ||
38 | cp "${getAttrFromPath (outputAttrPath ++ ["doc-options-md"]) config}" src/options.md | 56 | cp "${getAttrFromPath (outputAttrPath ++ ["doc-options-md"]) config}" src/options.md |
39 | 57 | ||
58 | ${cfg.preBuild} | ||
59 | |||
40 | mdbook build | 60 | mdbook build |
41 | 61 | ||
62 | ${cfg.postBuild} | ||
63 | |||
42 | cp -r book "$out" | 64 | cp -r book "$out" |
43 | ''; | 65 | ''; |
44 | }; | 66 | }; |