Files
itc.verteilte-anwendungen/flake.nix

112 lines
3.0 KiB
Nix
Raw Normal View History

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";
};
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
latexPackages = with pkgs; [
latexrun
(texlive.withPackages
(ps:
with ps; [
amsmath
biber
biblatex
changepage
csquotes
enumitem
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-20 13:07:26 +01:00
]))
];
in {
# 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-24 21:32:05 +01:00
build() {
latexmk \
-pdf \
-l -dir-report -file-line-error -verbose \
-interaction=nonstopmode \
"main.tex"
}
build || true
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 {
nativeBuildInputs = [];
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.
};
};
}