-
Notifications
You must be signed in to change notification settings - Fork 3
/
default.nix
70 lines (59 loc) · 1.25 KB
/
default.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
{ pkgs ? (import (builtins.fetchTarball {
url = https://github.com/NixOS/nixpkgs/archive/nixos-20.09.tar.gz;
}) {}) }:
let
my-theme = builtins.fetchTarball {
url = "https://github.com/ix-sthlm/hyde-x/archive/master.tar.gz";
};
my-texlive = pkgs.texlive.combine {
inherit (pkgs.texlive) scheme-basic
# Needed on top of scheme-basic
babel-english
babel-swedish
booktabs
datetime2-english
datetime2-swedish
ec
eurosym
hyphen-english
hyphen-swedish
ulem
# Needed on top of scheme-small
cm-super
# Needed on top of scheme-medium
capt-of
wrapfig
# More deps for handling of indented paragrafs
parskip
etoolbox
;
};
in pkgs.stdenv.mkDerivation rec {
name = "all";
src = ./.;
buildInputs = with pkgs; [
gnumake
hugo
emacs27-nox
nodePackages.svgo
my-texlive
];
patchPhase = ''
patchShebangs .github/make_document_dirlist.sh
'';
buildPhase = ''
make clean
# Install theme
mkdir -p themes
cp -r ${my-theme} themes/hyde-x
make color-logos
make documents2pdf
make dirlists
make hugo
make replace-favicon
make cname
'';
installPhase = ''
cp -vr public/ $out
'';
}