This commit is contained in:
Simon Bruder 2020-10-11 17:50:17 +02:00
parent 4e3bcc471d
commit 445c731640
No known key found for this signature in database
GPG key ID: 6F03E0000CC5B62F
4 changed files with 60 additions and 0 deletions

1
.envrc Normal file
View file

@ -0,0 +1 @@
use nix

2
.gitignore vendored
View file

@ -20,3 +20,5 @@
# reveal js (generated) # reveal js (generated)
/revealjs/*/index.html /revealjs/*/index.html
/result

56
default.nix Normal file
View file

@ -0,0 +1,56 @@
let
pkgs = import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/24c9b05ac53e422f1af81a156f1fd58499eb27fb.tar.gz") {};
# reproducible source
gitignoreSrc = pkgs.fetchFromGitHub {
owner = "hercules-ci";
repo = "gitignore";
rev = "c4662e662462e7bf3c2a968483478a665d00e717";
sha256 = "sha256:1npnx0h6bd0d7ql93ka7azhj40zgjp815fw2r6smg8ch9p7mzdlx";
};
inherit (import gitignoreSrc { inherit (pkgs) lib; }) gitignoreSource;
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
datetime
enumitem
fmtcount
pgfopts;
};
in
pkgs.stdenv.mkDerivation {
name = "presis";
nativeBuildInputs = [
python
texlive
];
src = gitignoreSource ./.;
FONTCONFIG_FILE = pkgs.makeFontsConf {
fontDirectories = with pkgs; [
fira
iosevka
];
};
enableParallelBuilding = true;
dontFixup = true;
installPhase = ''
cp -r . $out;
'';
}

1
shell.nix Normal file
View file

@ -0,0 +1 @@
import ./default.nix