add nix output for the book

This commit is contained in:
Charles Hall 2024-03-14 20:19:02 -07:00
parent 425660472c
commit 4f8d3953b3
No known key found for this signature in database
GPG key ID: 7B8E0645816E07CF

View file

@ -207,6 +207,35 @@
packages = {
default = package pkgsHost;
oci-image = mkOciImage pkgsHost self.packages.${system}.default;
book =
let
package = self.packages.${system}.default;
in
pkgsHost.stdenv.mkDerivation {
pname = "${package.pname}-book";
version = package.version;
src = nix-filter {
root = ./.;
include = [
"book.toml"
"conduit-example.toml"
"README.md"
"debian/README.md"
"docs"
];
};
nativeBuildInputs = (with pkgsHost; [
mdbook
]);
buildPhase = ''
mdbook build
mv public $out
'';
};
}
//
builtins.listToAttrs