Programmierbeleg/doc.nix
2022-08-13 21:04:14 +01:00

28 lines
798 B
Nix

{ self, stdenvNoCC, doxygen, graphviz, texlive-env, gnumake }: let
doxygen-step = stdenvNoCC.mkDerivation {
pname = "invtracker-doxygen";
version = self.lastModifiedDate;
src = self;
nativeBuildInputs = [doxygen graphviz];
buildPhase = ''
doxygen
find doc/latex -name '*.tex' | xargs sed -i 's/\\newline/\\newline{}/g'
'';
installPhase = ''
cp -rv doc $out
'';
};
refman = stdenvNoCC.mkDerivation {
name = "invtracker-refman-${self.lastModifiedDate}.pdf";
pname = "invtracker-refman";
version = self.lastModifiedDate;
src = doxygen-step;
nativeBuildInputs = [gnumake texlive-env];
buildPhase = ''
make -C latex LATEX_CMD=xelatex
'';
installPhase = ''
cp -v latex/refman.pdf $out
'';
};
in refman