mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-17 07:41:23 +01:00
add flake output for the website root
This commit is contained in:
parent
af15f0c596
commit
2bf1975e75
4 changed files with 34 additions and 2 deletions
28
nix/pkgs/website-root/default.nix
Normal file
28
nix/pkgs/website-root/default.nix
Normal 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
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue