mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-12-08 00:00:12 +03:00
* added nix build output for doc
* added nix develop shell for doc
This commit is contained in:
parent
3860a81448
commit
7feed58ce5
32
flake.nix
32
flake.nix
@ -76,6 +76,16 @@
|
|||||||
inherit system;
|
inherit system;
|
||||||
overlays = [ (import rust-overlay) ];
|
overlays = [ (import rust-overlay) ];
|
||||||
};
|
};
|
||||||
|
latexDerivation = (
|
||||||
|
pkgs.texliveBasic.withPackages (
|
||||||
|
ps: with ps; [
|
||||||
|
imakeidx
|
||||||
|
xkeyval
|
||||||
|
upquote
|
||||||
|
collection-fontsrecommended
|
||||||
|
]
|
||||||
|
)
|
||||||
|
);
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
packages =
|
packages =
|
||||||
@ -102,6 +112,22 @@
|
|||||||
packages
|
packages
|
||||||
// {
|
// {
|
||||||
default = self'.packages.${cargoToml.package.name};
|
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 = {
|
checks = {
|
||||||
@ -157,6 +183,12 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
devShells.doc = pkgs.mkShell {
|
||||||
|
packages = with pkgs; [
|
||||||
|
latexDerivation
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
treefmt.config = {
|
treefmt.config = {
|
||||||
projectRootFile = "flake.nix";
|
projectRootFile = "flake.nix";
|
||||||
flakeCheck = false;
|
flakeCheck = false;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user