neovim-flake/modules/plugins/languages/tex/build/builders/default.nix

71 lines
1.6 KiB
Nix
Raw Normal View History

2025-01-23 19:35:00 -07:00
{
config,
pkgs,
2025-01-23 19:35:00 -07:00
lib,
...
}:
let
2025-01-23 19:44:59 -07:00
inherit (lib.options) mkOption;
inherit (lib.types) enum listOf package str;
inherit (builtins) attrNames;
2025-01-23 19:35:00 -07:00
cfg = config.vim.languages.tex;
in
{
imports = [
2025-01-24 10:49:26 -07:00
./latexmk.nix
2025-01-23 19:35:00 -07:00
./tectonic.nix
];
options.vim.languages.tex.build.builder = {
name = mkOption {
type = enum (attrNames cfg.build.builders);
default = "latexmk";
description = ''
The tex builder to use.
This is just the default custom option. By setting any of the
builders to true, this will be overwritten by that builder's
parameters.
'';
2025-01-23 19:35:00 -07:00
};
args = mkOption {
type = listOf str;
default = [
"-pdf"
"%f"
];
description = ''
The list of args to pass to the builder.
This is just the default custom option. By setting any of the
builders to true, this will be overwritten by that builder's
parameters.
'';
2025-01-23 19:35:00 -07:00
};
package = mkOption {
type = package;
default = (pkgs.texlive.withPackages (ps: [ ps.latexmk ]));
description = ''
The tex builder package to use.
This is just the default custom option. By setting any of the
builders to true, this will be overwritten by that builder's
parameters.
'';
2025-01-23 19:35:00 -07:00
};
executable = mkOption {
type = str;
default = "latexmk";
description = ''
The tex builder executable to use.
This is just the default custom option. By setting any of the
builders to true, this will be overwritten by that builder's
parameters.
'';
2025-01-23 19:35:00 -07:00
};
};
}