nix flake for lualatex
This commit is contained in:
54
flake.nix
Normal file
54
flake.nix
Normal 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";
|
||||
};
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user