Browse Source

add nix output for the book

merge-requests/582/head
Charles Hall 2 years ago
parent
commit
4f8d3953b3
No known key found for this signature in database
GPG Key ID: 7B8E0645816E07CF
  1. 29
      flake.nix

29
flake.nix

@ -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

Loading…
Cancel
Save