* added nix build output for doc

* added nix develop shell for doc
This commit is contained in:
Alexander Ratajczak 2025-10-28 17:02:18 +01:00
parent 3860a81448
commit 7feed58ce5

View File

@ -76,6 +76,16 @@
inherit system;
overlays = [ (import rust-overlay) ];
};
latexDerivation = (
pkgs.texliveBasic.withPackages (
ps: with ps; [
imakeidx
xkeyval
upquote
collection-fontsrecommended
]
)
);
in
{
packages =
@ -102,6 +112,22 @@
packages
// {
default = self'.packages.${cargoToml.package.name};
doc = pkgs.stdenv.mkDerivation {
pname = "bcachefs-tools-doc";
inherit version;
src = ./doc;
buildInputs = with pkgs; [
latexDerivation
];
buildPhase = ''
pdflatex bcachefs-principles-of-operation.tex
pdflatex bcachefs-principles-of-operation.tex
'';
installPhase = ''
mkdir -p $out/doc
cp bcachefs-principles-of-operation.pdf $out/doc
'';
};
};
checks = {
@ -157,6 +183,12 @@
];
};
devShells.doc = pkgs.mkShell {
packages = with pkgs; [
latexDerivation
];
};
treefmt.config = {
projectRootFile = "flake.nix";
flakeCheck = false;