add flake output for the website root

This commit is contained in:
Charles Hall 2024-11-22 11:16:33 -08:00
parent af15f0c596
commit 2bf1975e75
No known key found for this signature in database
GPG key ID: 7B8E0645816E07CF
4 changed files with 34 additions and 2 deletions

View file

@ -0,0 +1,28 @@
# Keep sorted
{ inputs
, lib
, mdbook
, stdenv
}:
stdenv.mkDerivation {
name = "website-root";
src = let filter = inputs.nix-filter.lib; in filter {
root = inputs.self;
# Keep sorted
include = [
"book"
"book.toml"
];
};
buildPhase = ''
${lib.getExe mdbook} build
'';
installPhase = ''
mv target/book $out
'';
}