Add docsga
This commit is contained in:
parent
a50f970eda
commit
2195c7a850
10 changed files with 98 additions and 17 deletions
17
docs/default.nix
Normal file
17
docs/default.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{ pkgs, build_systems, ... }:
|
||||
|
||||
let
|
||||
makeOptionsDoc = configuration: pkgs.nixosOptionsDoc { inherit (configuration) options lib; };
|
||||
example = makeOptionsDoc (build_systems [ "example" ] ../example/.)."example";
|
||||
in
|
||||
pkgs.stdenvNoCC.mkDerivation {
|
||||
name = "dashNix-book";
|
||||
src = ./.;
|
||||
|
||||
patchPhase = ''
|
||||
sed '/*Declared by:*/,/^$/d' <${example.optionsCommonMark} >> src/dashNix.md
|
||||
'';
|
||||
buildPhase = ''
|
||||
${pkgs.mdbook}/bin/mdbook build --dest-dir $out
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue