Add bundled report example

This commit is contained in:
2020-11-17 15:51:09 +01:00
parent fe0bd8b200
commit 33f6ae7e55
7 changed files with 92 additions and 30 deletions

View File

@@ -2,18 +2,18 @@
stdenv
, fig
}:
stdenv.mkDerivation {
name = "report";
src = ./.;
buildPhase = ''
grep -o '@[^ @]*@' report.tex | sed 's/@//g' | sort -u > list
stdenv.mkDerivation {
name = "sedReport";
src = ./report;
buildPhase = ''
grep -o '@[^ @]*@' report.tex | sed 's/@//g' | sort -u > list
echo "fig:" > fun.nix
echo "'''" >> fun.nix
sed 's:\(^.*\)$:sed -i "s;@\1@;''${\1};g" report.tex:g' list >> fun.nix
echo "'''" >> fun.nix
'';
installPhase = ''
cp fun.nix $out
'';
}
echo "fig:" > fun.nix
echo "'''" >> fun.nix
sed 's:\(^.*\)$:sed -i "s;@\1@;''${\1};g" report.tex:g' list >> fun.nix
echo "'''" >> fun.nix
'';
installPhase = ''
cp fun.nix $out
'';
}