Skip to content
This repository has been archived by the owner on Nov 1, 2024. It is now read-only.

Commit

Permalink
ci(nix): add Nix build
Browse files Browse the repository at this point in the history
  • Loading branch information
storopoli committed Nov 6, 2023
1 parent fe35e79 commit 8ee081f
Show file tree
Hide file tree
Showing 3 changed files with 127 additions and 1 deletion.
78 changes: 78 additions & 0 deletions slides/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

48 changes: 48 additions & 0 deletions slides/flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
description = "A basic flake with a shell";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
inputs.flake-utils.url = "github:numtide/flake-utils";

outputs = { self, nixpkgs, nixpkgs-biber, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
tex = pkgs.texlive.combine {
inherit (pkgs.texlive) scheme-small;
inherit (pkgs.texlive) latexmk pgf pgfplots tikzsymbols biblatex beamer;
inherit (pkgs.texlive) silence appendixnumberbeamer fira fontaxes mwe;
inherit (pkgs.texlive) noto csquotes babel helvetic transparent;
inherit (pkgs.texlive) xpatch hyphenat wasysym algorithm2e listings;
inherit (pkgs.texlive) lstbayes ulem subfigure ifoddpage relsize;
inherit (pkgs.texlive) adjustbox media9 ocgx2 biblatex-apa wasy;
};
in
{
devShells.default = pkgs.mkShell {
packages = [
pkgs.bashInteractive
pkgs.pdfpc
];
};
defaultPackage = pkgs.stdenvNoCC.mkDerivation rec {
name = "slides";
src = self;
buildInputs = [
pkgs.coreutils
tex
pkgs.gnuplot
pkgs.biber
];
phases = [ "unpackPhase" "buildPhase" "installPhase" ];
buildPhase = ''
export PATH="${pkgs.lib.makeBinPath buildInputs}";
export HOME=$(pwd)
latexmk -pdflatex -shell-escape slides.tex
'';
installPhase = ''
mkdir -p $out
cp slides.pdf $out/
'';
};
});
}
2 changes: 1 addition & 1 deletion slides/slides.tex
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
\graphicspath{{logos}{images}}
\pgfplotsset{height=6cm, % only if needed
width=12cm,
compat=1.17,
compat=1.18,
legend style = {fill = black, draw = white},
contour/every contour label/.style={
every node/.style={mapped color!50!black,fill=black}}
Expand Down

0 comments on commit 8ee081f

Please sign in to comment.