diff options
| author | Chris Wells <chris@mathematicaster.org> | 2026-02-27 17:09:14 -0600 |
|---|---|---|
| committer | Chris Wells <chris@mathematicaster.org> | 2026-02-27 17:09:14 -0600 |
| commit | 58453dd110fa970d0176cb7cab1af5332f095ce7 (patch) | |
| tree | d43c6e854bfa50fd5b6421b87cc1616281ca4944 /module.nix | |
| parent | 9a1ce9bd883f540d1626fb7b25a36d734bc1be53 (diff) | |
| download | tex-shell-master.tar tex-shell-master.tar.gz tex-shell-master.tar.bz2 tex-shell-master.tar.lz tex-shell-master.tar.xz tex-shell-master.tar.zst tex-shell-master.zip | |
Diffstat (limited to 'module.nix')
| -rw-r--r-- | module.nix | 28 |
1 files changed, 25 insertions, 3 deletions
@@ -3,7 +3,6 @@ let inherit (lib) mkIf mkOption - mkPackageOption mkEnableOption types ; @@ -15,10 +14,25 @@ in { options = { texShell = { - scheme = mkPackageOption pkgs "texliveSmall" { }; + scheme = mkOption { + type = types.packages; + default = pkgs.texliveSmall; + description = '' + The base texlive scheme to use. Choose between: + - pkgs.texliveSmall + - pkgs.texliveMedium + - pkgs.texliveFull + - pkgs.texliveBasic + - pkgs.texliveMinimal + - pkgs.texliveTeTex + ''; + }; extraPackages = mkOption { type = types.functionTo (types.listOf types.package); - description = "Extra packages to add to the texlive scheme"; + description = '' + Extra packages to add to the texlive scheme. + Unlike more sophisticated projects such as [latex-utils](https://github.com/jmmaloney4/latex-utils), there is no auto-discovery of necessary packages. + ''; default = _: [ ]; }; latexmk = { @@ -26,6 +40,11 @@ in rc = mkOption { type = types.lines; description = "contents of the .latexmkrc file"; + default = /* perl */ '' + $out_dir = '.latex-build'; + $pdf_mode = 1; + $pdflatex = 'lualatex -interaction=nonstopmode -file-line-error -synctex=1 %O %S'; + ''; }; rcFile = mkOption { type = types.path; @@ -36,6 +55,7 @@ in type = types.functionTo types.package; readOnly = true; internal = true; + description = "A wrapper derivation to add the rc file to latexmk"; default = tex: pkgs.symlinkJoin { @@ -52,6 +72,7 @@ in package = mkOption { type = types.package; readOnly = true; + description = "The final texlive package"; default = let wrapper = if config.texShell.latexmk.enable then config.texShell.latexmk._wrapper else x: x; @@ -61,6 +82,7 @@ in devShell = mkOption { type = types.package; readOnly = true; + description = "The final texlive shell"; default = pkgs.mkShellNoCC { buildInputs = [ config.texShell.build.package ]; }; }; }; |
