Simon Bruder
46f08e1817
All checks were successful
continuous-integration/drone/push Build is passing
This also changes how reveal.js is vendored and as a consequence of this change, it needs to dereference the build result before deploying it with netlify. This is because flakes do not like submodules and netlify does not like symlinks.
85 lines
2 KiB
Nix
85 lines
2 KiB
Nix
{
|
||
inputs = {
|
||
#nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||
# At the time of writing, netlify-cli’s build is failing on unstable.
|
||
nixpkgs.url = "github:sbruder/nixpkgs/fix-netlify-cli";
|
||
flake-utils.url = "github:numtide/flake-utils";
|
||
|
||
revealjs.url = "github:hakimel/reveal.js/4.1.0";
|
||
revealjs.flake = false;
|
||
};
|
||
|
||
outputs = { self, flake-utils, nixpkgs, revealjs }: flake-utils.lib.eachDefaultSystem (system:
|
||
let
|
||
pkgs = nixpkgs.legacyPackages.${system};
|
||
in
|
||
rec {
|
||
packages.sbruder.presis =
|
||
let
|
||
python = (pkgs.python38.withPackages (ps: with ps; [
|
||
CommonMark
|
||
jinja2
|
||
pyyaml
|
||
]));
|
||
|
||
texlive = pkgs.texlive.combine {
|
||
inherit (pkgs.texlive)
|
||
scheme-medium
|
||
appendixnumberbeamer
|
||
beamertheme-focus
|
||
beamertheme-metropolis
|
||
biber
|
||
biblatex
|
||
csquotes
|
||
datetime
|
||
datetime2
|
||
datetime2-german
|
||
enumitem
|
||
fmtcount
|
||
multirow
|
||
pgfopts;
|
||
};
|
||
in
|
||
pkgs.stdenv.mkDerivation {
|
||
name = "sbruder-presis";
|
||
|
||
nativeBuildInputs = [
|
||
python
|
||
texlive
|
||
];
|
||
|
||
src = self;
|
||
|
||
FONTCONFIG_FILE = pkgs.makeFontsConf {
|
||
fontDirectories = with pkgs; [
|
||
fira
|
||
iosevka
|
||
];
|
||
};
|
||
|
||
enableParallelBuilding = true;
|
||
|
||
configurePhase = ''
|
||
ln -sfT ${revealjs} revealjs/_assets/reveal.js
|
||
'';
|
||
|
||
installPhase = ''
|
||
cp -r . $out;
|
||
'';
|
||
|
||
dontFixup = true;
|
||
};
|
||
|
||
defaultPackage = packages.sbruder.presis;
|
||
|
||
devShell = pkgs.mkShell {
|
||
buildInputs = packages.sbruder.presis.nativeBuildInputs ++ (with pkgs; [
|
||
bash
|
||
netlify-cli
|
||
]);
|
||
|
||
shellHook = packages.sbruder.presis.configurePhase;
|
||
};
|
||
});
|
||
}
|