nix flake for lualatex 2

This commit is contained in:
Priec
2026-02-25 09:44:12 +01:00
parent 02db8fc661
commit caedb5917b
2 changed files with 35 additions and 30 deletions

17
flake.lock generated
View File

@@ -1,5 +1,21 @@
{
"nodes": {
"fibeamer": {
"flake": false,
"locked": {
"lastModified": 1632472447,
"narHash": "sha256-iITRsfepm6ZnHs7rPKPp4aPhb2Y9PKfR8JcbPvHJiTk=",
"owner": "Witiko",
"repo": "fibeamer",
"rev": "8c1ff9e80a8f7d83239686d8fec520592ace5366",
"type": "github"
},
"original": {
"owner": "Witiko",
"repo": "fibeamer",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
@@ -36,6 +52,7 @@
},
"root": {
"inputs": {
"fibeamer": "fibeamer",
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
}

View File

@@ -1,54 +1,42 @@
# flake.nix
{
description = "LuaLaTeX compilation environment";
description = "LaTeX compilation environment for thesis and beamer presentation";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
fibeamer = {
url = "github:Witiko/fibeamer";
flake = false;
};
};
outputs = { self, nixpkgs, flake-utils }:
outputs = { self, nixpkgs, flake-utils, fibeamer }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
texlive = pkgs.texlive.combine {
inherit (pkgs.texlive)
scheme-medium
luatex
latex-bin
latexmk
# Add additional packages as needed:
# amsmath
# fontspec
# unicode-math
# microtype
# geometry
# hyperref
# graphicx
# xcolor
;
inherit (pkgs.texlive) scheme-full;
};
# Build a TEXMF tree for fibeamer so LaTeX can find it
fibeamerTexmf = pkgs.runCommand "fibeamer-texmf" {} ''
mkdir -p $out/tex/latex/fibeamer
cp -r ${fibeamer}/* $out/tex/latex/fibeamer/
'';
in
{
devShells.default = pkgs.mkShell {
name = "lualatex-env";
name = "latex-env";
buildInputs = [
texlive
pkgs.lua5_3
pkgs.biber
];
shellHook = ''
echo "LuaLaTeX environment loaded"
echo "Available: lualatex, latexmk, luatex"
lualatex --version | head -1
export TEXMFHOME="${fibeamerTexmf}:"
echo "LaTeX environment loaded (pdflatex + biber + fibeamer)"
pdflatex --version | head -1
'';
};
# App for direct compilation
apps.default = {
type = "app";
program = "${texlive}/bin/lualatex";
};
});
}