docs/website: create package definition

This makes deployment through CI way easier.
This commit is contained in:
Gabriel Arazas 2024-09-04 19:14:14 +08:00
parent c2da083e5f
commit 9aff86a3e8
No known key found for this signature in database
GPG Key ID: 62104B43D00AA360

34
docs/website/package.nix Normal file
View File

@ -0,0 +1,34 @@
{
lib,
buildHugoSite,
bundlerEnv,
ruby_3_1,
writeShellScriptBin,
}:
let
gems = bundlerEnv {
name = "foodogsquared-docs-gemset";
ruby = ruby_3_1;
gemdir = ./.;
};
asciidoctorWrapper = writeShellScriptBin "asciidoctor" ''
${lib.getExe' gems "asciidoctor"} -T ${./assets/templates/asciidoctor} $@
'';
in
buildHugoSite {
pname = "foodogsquared-docs";
version = "2024-09-03";
src = lib.cleanSource ./.;
vendorHash = "";
buildInputs = [ asciidoctorWrapper gems ];
meta = with lib; {
description = "foodogsquared's NixOS configuration docs";
license = licenses.mit;
};
}