Split installPhase and buildPhase
This commit is contained in:
parent
6f98c753c2
commit
2094b1ba2e
1 changed files with 21 additions and 7 deletions
28
flake.nix
28
flake.nix
|
@ -35,17 +35,31 @@
|
||||||
|
|
||||||
buildInputs = commonBuildInputs;
|
buildInputs = commonBuildInputs;
|
||||||
|
|
||||||
|
phases = [
|
||||||
|
"unpackPhase"
|
||||||
|
"installPhase"
|
||||||
|
"buildPhase"
|
||||||
|
];
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
|
||||||
|
rst2pdf slides.rst \
|
||||||
|
--break-level 1 \
|
||||||
|
--extension-module preprocess \
|
||||||
|
--fit-background-mode scale \
|
||||||
|
--font-path "${toString shared}/fonts" \
|
||||||
|
--output slides.pdf \
|
||||||
|
--stylesheets bw,"${toString shared}/styles/opdavies-light"
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
runHook preBuild
|
runHook preBuild
|
||||||
|
|
||||||
mkdir $out
|
mkdir $out
|
||||||
|
cp slides.pdf $out
|
||||||
rst2pdf slides.rst \
|
|
||||||
--break-level 1 \
|
|
||||||
--fit-background-mode scale \
|
|
||||||
--font-path "${toString shared}/fonts" \
|
|
||||||
--output "$out/slides.pdf" \
|
|
||||||
--stylesheets bw,"${toString shared}/styles/opdavies-light"
|
|
||||||
|
|
||||||
runHook postBuild
|
runHook postBuild
|
||||||
'';
|
'';
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue