2026-01-20 13:07:26 +01:00
|
|
|
{
|
|
|
|
|
description = "Verteilte Anwedungen -- Solo Projekt";
|
|
|
|
|
|
|
|
|
|
inputs = {
|
|
|
|
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
|
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/9da7f1cf7f8a6e2a7cb3001b048546c92a8258b4";
|
2026-01-25 02:26:40 +01:00
|
|
|
cartograph-cf = {
|
2026-01-26 20:34:08 +01:00
|
|
|
url = "github:0qln/Cartograph";
|
2026-01-25 02:26:40 +01:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
|
};
|
2026-01-20 13:07:26 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
outputs = inputs @ {
|
|
|
|
|
flake-parts,
|
|
|
|
|
self,
|
|
|
|
|
...
|
|
|
|
|
}:
|
|
|
|
|
flake-parts.lib.mkFlake {inherit inputs;} {
|
|
|
|
|
imports = [];
|
|
|
|
|
systems = ["x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin"];
|
|
|
|
|
perSystem = {
|
|
|
|
|
config,
|
|
|
|
|
self',
|
|
|
|
|
inputs',
|
|
|
|
|
pkgs,
|
|
|
|
|
system,
|
|
|
|
|
...
|
|
|
|
|
}:
|
|
|
|
|
with pkgs.lib; let
|
2026-01-25 02:26:40 +01:00
|
|
|
fonts = with pkgs; [
|
|
|
|
|
ibm-plex
|
|
|
|
|
cartographcf-nerdfont
|
|
|
|
|
];
|
2026-01-20 13:07:26 +01:00
|
|
|
latexPackages = with pkgs; [
|
|
|
|
|
latexrun
|
|
|
|
|
(texlive.withPackages
|
|
|
|
|
(ps:
|
|
|
|
|
with ps; [
|
|
|
|
|
amsmath
|
|
|
|
|
biber
|
|
|
|
|
biblatex
|
2026-01-25 02:26:40 +01:00
|
|
|
biblatex-ieee
|
2026-01-20 13:07:26 +01:00
|
|
|
changepage
|
|
|
|
|
csquotes
|
|
|
|
|
enumitem
|
2026-01-26 09:30:45 +01:00
|
|
|
caption
|
2026-01-20 13:07:26 +01:00
|
|
|
fontaxes
|
|
|
|
|
latexmk
|
|
|
|
|
listings
|
|
|
|
|
minted
|
|
|
|
|
newtx
|
|
|
|
|
newtxsf
|
|
|
|
|
newtxtt
|
|
|
|
|
scheme-medium
|
|
|
|
|
textpos
|
|
|
|
|
times
|
|
|
|
|
titlesec
|
|
|
|
|
transparent
|
|
|
|
|
upquote
|
2026-01-24 21:32:05 +01:00
|
|
|
tocloft
|
|
|
|
|
makecell
|
2026-01-25 00:05:49 +01:00
|
|
|
appendix
|
|
|
|
|
apa
|
2026-01-25 02:26:40 +01:00
|
|
|
csquotes
|
|
|
|
|
csquotes-de
|
2026-01-20 13:07:26 +01:00
|
|
|
]))
|
|
|
|
|
];
|
|
|
|
|
in {
|
2026-01-25 02:26:40 +01:00
|
|
|
_module.args.pkgs = import inputs.nixpkgs {
|
|
|
|
|
inherit system;
|
|
|
|
|
overlays = [
|
|
|
|
|
inputs.cartograph-cf.overlays.default
|
|
|
|
|
];
|
|
|
|
|
config = {};
|
|
|
|
|
};
|
|
|
|
|
|
2026-01-20 13:07:26 +01:00
|
|
|
# Per-system attributes can be defined here. The self' and inputs'
|
|
|
|
|
# module parameters provide easy access to attributes of the same
|
|
|
|
|
# system.
|
|
|
|
|
packages = with pkgs; {
|
|
|
|
|
default = stdenvNoCC.mkDerivation rec {
|
2026-01-24 21:32:05 +01:00
|
|
|
name = "seriousgames-seminar";
|
2026-01-20 13:07:26 +01:00
|
|
|
version = "1.0.0";
|
|
|
|
|
src = ./.;
|
|
|
|
|
buildInputs = latexPackages;
|
|
|
|
|
buildPhase =
|
|
|
|
|
# sh
|
|
|
|
|
''
|
|
|
|
|
cd .
|
|
|
|
|
|
2026-01-25 02:26:40 +01:00
|
|
|
mkdir -p out
|
|
|
|
|
|
|
|
|
|
# https://github.com/NixOS/nixpkgs/issues/180639#issuecomment-1178984307
|
|
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
|
|
|
|
|
|
# https://wiki.contextgarden.net/Characters_words_and_fonts/Fonts_in_LuaTeX
|
|
|
|
|
mkdir -p .fonts
|
|
|
|
|
(cd .fonts && ${concatMapStrings (x: "ln -s ${x} '${x.meta.name}'; ") fonts})
|
|
|
|
|
export OSFONTDIR=".fonts"
|
|
|
|
|
ls .fonts
|
|
|
|
|
|
2026-01-24 21:32:05 +01:00
|
|
|
build() {
|
|
|
|
|
latexmk \
|
|
|
|
|
-l -dir-report -file-line-error -verbose \
|
|
|
|
|
-interaction=nonstopmode \
|
|
|
|
|
"main.tex"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
build
|
2026-01-20 13:07:26 +01:00
|
|
|
'';
|
|
|
|
|
installPhase =
|
|
|
|
|
# sh
|
|
|
|
|
''
|
|
|
|
|
mkdir -p $out/share $out/log $out/artifacts
|
2026-01-24 21:32:05 +01:00
|
|
|
cp out/main.pdf "$out/share/seriousgames-telemetry.pdf"
|
2026-01-20 13:07:26 +01:00
|
|
|
cp out/*.log $out/log/
|
|
|
|
|
cp -r out/* $out/artifacts
|
|
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
devShells.default = with pkgs;
|
|
|
|
|
mkShell {
|
2026-01-25 02:26:40 +01:00
|
|
|
nativeBuildInputs = fonts;
|
2026-01-20 13:07:26 +01:00
|
|
|
packages = [mermaid-cli] ++ latexPackages;
|
|
|
|
|
|
|
|
|
|
shellHook =
|
|
|
|
|
# bash
|
|
|
|
|
''
|
2026-01-25 00:05:49 +01:00
|
|
|
export PATH="$PATH:bin/"
|
2026-01-20 13:07:26 +01:00
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
flake = {
|
|
|
|
|
# The usual flake attributes can be defined here, including system-
|
|
|
|
|
# agnostic ones like nixosModule and system-enumerating ones, although
|
|
|
|
|
# those are more easily expressed in perSystem.
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
}
|