nix flake for lualatex

This commit is contained in:
Priec
2026-02-25 09:28:19 +01:00
commit 02db8fc661
2 changed files with 115 additions and 0 deletions

54
flake.nix Normal file
View File

@@ -0,0 +1,54 @@
# flake.nix
{
description = "LuaLaTeX compilation environment";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
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
;
};
in
{
devShells.default = pkgs.mkShell {
name = "lualatex-env";
buildInputs = [
texlive
pkgs.lua5_3
];
shellHook = ''
echo "LuaLaTeX environment loaded"
echo "Available: lualatex, latexmk, luatex"
lualatex --version | head -1
'';
};
# App for direct compilation
apps.default = {
type = "app";
program = "${texlive}/bin/lualatex";
};
});
}