Builds!
This commit is contained in:
@@ -14,10 +14,9 @@
|
||||
inherit (pkgs.texlive)
|
||||
scheme-small
|
||||
latexmk
|
||||
# Hebrew + encoding
|
||||
babel-hebrew
|
||||
hebrew-fonts
|
||||
ucs
|
||||
# Hebrew + multilingual (XeLaTeX path)
|
||||
bidi
|
||||
polyglossia
|
||||
# Page layout
|
||||
fancyhdr
|
||||
setspace
|
||||
@@ -31,12 +30,13 @@
|
||||
mathtools
|
||||
amsmath
|
||||
amscls
|
||||
was
|
||||
gensymb
|
||||
# Text
|
||||
enumitem
|
||||
footmisc
|
||||
csquotes
|
||||
# Theorems + algorithms
|
||||
relsize
|
||||
ntheorem
|
||||
chngcntr
|
||||
algorithm2e
|
||||
@@ -44,28 +44,58 @@
|
||||
natbib
|
||||
tocbibind
|
||||
# Cross-references
|
||||
zref
|
||||
ifoddpage
|
||||
cleveref
|
||||
# Misc
|
||||
silence
|
||||
;
|
||||
};
|
||||
|
||||
fontsConf = pkgs.makeFontsConf {
|
||||
fontDirectories = [ pkgs.culmus ];
|
||||
};
|
||||
in
|
||||
{
|
||||
devShells.${system}.default = pkgs.mkShell {
|
||||
buildInputs = [ (pkgs.texlive.combine texPkgs) ];
|
||||
buildInputs = [ (pkgs.texlive.combine texPkgs) pkgs.culmus pkgs.fontconfig ];
|
||||
shellHook = ''
|
||||
export FONTCONFIG_FILE="${fontsConf}"
|
||||
'';
|
||||
};
|
||||
|
||||
packages.${system}.default = pkgs.stdenvNoCC.mkDerivation rec {
|
||||
name = "roll-thesis";
|
||||
src = self;
|
||||
buildInputs = [ pkgs.coreutils (pkgs.texlive.combine texPkgs) ];
|
||||
buildInputs = [
|
||||
pkgs.coreutils
|
||||
pkgs.fontconfig
|
||||
(pkgs.texlive.combine texPkgs)
|
||||
pkgs.culmus
|
||||
];
|
||||
phases = [ "unpackPhase" "buildPhase" "installPhase" ];
|
||||
buildPhase = ''
|
||||
export PATH="${pkgs.lib.makeBinPath buildInputs}";
|
||||
mkdir -p .cache/texmf-var
|
||||
mkdir -p .cache/texmf-var .cache/fontconfig
|
||||
|
||||
# Build a fontconfig pointing at culmus with a writable cache
|
||||
FCACHE="$(pwd)/.cache/fontconfig"
|
||||
cat > .cache/fonts.conf <<EOF
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
<fontconfig>
|
||||
<dir>${pkgs.culmus}/share/fonts/truetype</dir>
|
||||
<cachedir>$FCACHE</cachedir>
|
||||
</fontconfig>
|
||||
EOF
|
||||
export FONTCONFIG_FILE="$(pwd)/.cache/fonts.conf"
|
||||
export FONTCONFIG_CACHE="$FCACHE"
|
||||
fc-cache -f 2>/dev/null || true
|
||||
|
||||
env TEXMFHOME=.cache TEXMFVAR=.cache/texmf-var \
|
||||
latexmk -pdf --interaction=nonstopmode \
|
||||
main.tex
|
||||
latexmk -xelatex -f --interaction=nonstopmode \
|
||||
main.tex || true
|
||||
test -f main.pdf
|
||||
'';
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
|
||||
Reference in New Issue
Block a user