Programmierbeleg/doc.nix

29 lines
798 B
Nix
Raw Normal View History

2022-08-13 20:04:02 +00:00
{ 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