55 lines
1.3 KiB
Nix
55 lines
1.3 KiB
Nix
# 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";
|
|
};
|
|
});
|
|
}
|