mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-11-10 15:35:30 +00:00
Created latexmk builder
This commit is contained in:
parent
387eb9ba27
commit
aef828406d
3 changed files with 78 additions and 11 deletions
|
|
@ -1,36 +1,35 @@
|
|||
# This function acts as a template for creating new builders.
|
||||
# It enforces providing all the parameters required for creating
|
||||
# a new builder for it to be able to work in the existing code.
|
||||
|
||||
#
|
||||
# The first layer requirements are as follows:
|
||||
{
|
||||
# This is the name of the builder, it will only be used internally and
|
||||
# should match the <name>.nix file that the builder is implemented in.
|
||||
name,
|
||||
|
||||
#
|
||||
# Module attribute set. This is the attribute set that the module that is
|
||||
# defining a builder is passed as its input.
|
||||
moduleInheritencePackage,
|
||||
|
||||
#
|
||||
# These are the standard options for the builder just like creating any
|
||||
# other module. Some options are required and are described below but
|
||||
# it will also accept any other options that are provided to it.
|
||||
options,
|
||||
|
||||
#
|
||||
# These are the command line arguments that will accompany the executable
|
||||
# when the build command is called.
|
||||
# This is a function that will take in the cfg of its own builder.
|
||||
# i.e. will be called as "args cfg.build.builders.${name}"
|
||||
args,
|
||||
|
||||
...
|
||||
}: let
|
||||
# Inherit the necessary variables available to any module.
|
||||
inherit (moduleInheritencePackage) lib config;
|
||||
|
||||
#
|
||||
# Inherit other useful functions.
|
||||
inherit (lib.modules) mkIf;
|
||||
|
||||
#
|
||||
# Set the cfg variable
|
||||
cfg = config.vim.languages.tex;
|
||||
in {
|
||||
|
|
@ -39,15 +38,15 @@ in {
|
|||
options.vim.languages.tex.build.builders.${name} = ({
|
||||
# The enable option. This one is self explanatory.
|
||||
enable,
|
||||
|
||||
#
|
||||
# This is the package option for the builder.
|
||||
package,
|
||||
|
||||
#
|
||||
# This is the executable that will be used to call the builder.
|
||||
# It, along with package will result in:
|
||||
# "<package_path>/bin/<executable>"
|
||||
executable,
|
||||
|
||||
#
|
||||
# Any other options provided are accepted.
|
||||
...
|
||||
} @ opts:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue