fix: got teh ci/cd working
This commit is contained in:
parent
240b2ab9cf
commit
7ce5eb3fe5
3 changed files with 38 additions and 24 deletions
27
flake.nix
27
flake.nix
|
@ -41,11 +41,6 @@
|
|||
#scheme-full
|
||||
inherit (pkgs.texlive) scheme-full latex-bin latexmk;
|
||||
};
|
||||
|
||||
vars = [ "sender" "receiver" ];
|
||||
texvars = toString
|
||||
(pkgs.lib.imap1 (i: n: ''\def\${n}{${"$" + (toString i)}}'') vars);
|
||||
|
||||
in rec {
|
||||
# `nix develop`
|
||||
devShell = pkgs.mkShell {
|
||||
|
@ -58,24 +53,10 @@
|
|||
};
|
||||
|
||||
packages = {
|
||||
# using https://flyx.org/nix-flakes-latex/ as a basic
|
||||
constitution = pkgs.stdenvNoCC.mkDerivation rec {
|
||||
name = "ul_computer-society_constitution";
|
||||
src = self;
|
||||
buildInputs = [ pkgs.coreutils tex ];
|
||||
phases = ["unpackPhase" "buildPhase" "installPhase"];
|
||||
buildPhase = ''
|
||||
export PATH="${pkgs.lib.makeBinPath buildInputs}";
|
||||
# have to do it 3 times to get teh table of contents working properly
|
||||
pdflatex -file-line-error -interaction=nonstopmode -synctex=1 -output-format=pdf Resources/Documents/Constitution.tex || true
|
||||
pdflatex -file-line-error -interaction=nonstopmode -synctex=1 -output-format=pdf Resources/Documents/Constitution.tex || true
|
||||
pdflatex -file-line-error -interaction=nonstopmode -synctex=1 -output-format=pdf Resources/Documents/Constitution.tex || true
|
||||
'';
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
cp Constitution.pdf $out/
|
||||
'';
|
||||
};
|
||||
constitution = pkgs.writeShellScriptBin "format_constitution" ''
|
||||
export PATH=${pkgs.lib.makeBinPath [pkgs.coreutils tex]}:$PATH
|
||||
${./_scripts/format_constitution.sh}
|
||||
'';
|
||||
|
||||
handovers = pkgs.writeShellScriptBin "format_handovers" ''
|
||||
export PATH=${pkgs.lib.makeBinPath [pkgs.wkhtmltopdf bfom.defaultPackage.x86_64-linux]}:$PATH
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue