rose-pine-nix/docs/mk-site.nix
seth 1f11b0aeb0
feat!: move docs to website (#170)
* feat!: move docs to website

* feat: flesh out docs site

* docs: add changelog to website

* docs: fix `npins add` command snippet

* docs: remove broken declarations

* ci: remove local docgen

* docs: update site FAQ
2024-05-21 16:57:51 -04:00

48 lines
800 B
Nix

{ lib
, stdenvNoCC
, writeShellApplication
, mdbook
, python3
}: { nixosDoc
, homeManagerDoc
, ...
}@args:
stdenvNoCC.mkDerivation (finalAttrs: args // {
nativeBuildInputs = [
mdbook
];
dontPatch = true;
dontConfigure = true;
doCheck = false;
buildPhase = ''
runHook preBuild
ln -s ${nixosDoc} src/options/nixos-options.md
ln -s ${homeManagerDoc} src/options/home-manager-options.md
mdbook build
runHook postBuild
'';
installPhase = ''
runHook preInstall
mv book $out
runHook postInstall
'';
passthru = {
serve = writeShellApplication {
name = "serve";
runtimeInputs = [ python3 ];
text = ''
python -m http.server --bind 127.0.0.1 --directory ${finalAttrs.finalPackage}
'';
};
};
})