2024-02-22 06:34:18 +00:00
|
|
|
# A Bahaghari module for interacting with the Tinted Theming builder.
|
2024-02-25 09:21:00 +00:00
|
|
|
{ lib, pkgs, ... }:
|
2024-02-22 06:34:18 +00:00
|
|
|
|
|
|
|
{
|
|
|
|
options.bahaghari.tinted-theming.builder = {
|
2024-02-25 09:21:00 +00:00
|
|
|
script = lib.mkOption {
|
2024-02-22 06:34:18 +00:00
|
|
|
type = with lib.types; functionTo str;
|
|
|
|
default = args: ''
|
|
|
|
${lib.getExe' pkgs.base16-builder-go "base16-builder-go"} \
|
|
|
|
-schemes-dir ${lib.escapeShellArg args.schemesDir} \
|
2024-02-25 09:21:00 +00:00
|
|
|
-template-dir ${lib.escapeShell args.templateDir}
|
2024-02-22 06:34:18 +00:00
|
|
|
'';
|
|
|
|
description = ''
|
|
|
|
A function returning a script to be applied per-template. The
|
|
|
|
function parameter is an attribute set with the following values:
|
|
|
|
|
2024-02-25 09:21:00 +00:00
|
|
|
* `templateDir` contains the path to the template.
|
2024-02-22 06:34:18 +00:00
|
|
|
* `schemesDir` is a path containing all of the schemes as a YAML file
|
|
|
|
(technically a JSON file).
|
2024-02-25 09:21:00 +00:00
|
|
|
|
|
|
|
This is primarily used for generating templates with
|
|
|
|
`bahaghariUtils.tinted-theming.generateOutputFromSchemes` function.
|
2024-02-22 06:34:18 +00:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|