mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-11-10 15:35:30 +00:00
Created build module
This commit is contained in:
parent
48674a46fa
commit
44959a0c8a
6 changed files with 820 additions and 302 deletions
65
modules/plugins/languages/tex/build/builders/default.nix
Normal file
65
modules/plugins/languages/tex/build/builders/default.nix
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib.options) mkOption mkEnableOption;
|
||||
inherit
|
||||
(lib.types)
|
||||
bool
|
||||
enum
|
||||
ints
|
||||
listOf
|
||||
package
|
||||
str
|
||||
;
|
||||
inherit
|
||||
(builtins)
|
||||
attrNames
|
||||
concatLists
|
||||
concatStringsSep
|
||||
elem
|
||||
elemAt
|
||||
filter
|
||||
hasAttr
|
||||
isAttrs
|
||||
length
|
||||
map
|
||||
throw
|
||||
toString
|
||||
;
|
||||
|
||||
cfg = config.vim.languages.tex;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./custom.nix
|
||||
./tectonic.nix
|
||||
];
|
||||
|
||||
options.vim.languages.tex.build.builder = {
|
||||
name = mkOption {
|
||||
type = enum (attrNames cfg.build.builders);
|
||||
default = "tectonic";
|
||||
description = "The tex builder to use";
|
||||
};
|
||||
args = mkOption {
|
||||
type = listOf str;
|
||||
default = [];
|
||||
description = "The list of args to pass to the builder";
|
||||
};
|
||||
package = mkOption {
|
||||
type = package;
|
||||
default = cfg.build.builders.tectonic.package;
|
||||
description = "The tex builder package to use";
|
||||
};
|
||||
executable = mkOption {
|
||||
type = str;
|
||||
default = cfg.build.builders.tectonic.executable;
|
||||
description = "The tex builder executable to use";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue