From b74d53ed09e4786c3941ab02a8cb2eaca08f88b8 Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Sun, 25 Feb 2024 17:21:00 +0800 Subject: [PATCH] bahaghari/modules/tinted-theming: update builder module --- .../modules/tinted-theming/builder.nix | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/subprojects/bahaghari/modules/tinted-theming/builder.nix b/subprojects/bahaghari/modules/tinted-theming/builder.nix index 72002bf7..740179ca 100644 --- a/subprojects/bahaghari/modules/tinted-theming/builder.nix +++ b/subprojects/bahaghari/modules/tinted-theming/builder.nix @@ -1,28 +1,25 @@ # A Bahaghari module for interacting with the Tinted Theming builder. -{ config, lib, pkgs, ... }: +{ lib, pkgs, ... }: -let - cfg = config.bahaghari; -in { options.bahaghari.tinted-theming.builder = { - package = lib.mkPackageOption pkgs "base16-builder-go" { }; - - extraArgs = lib.mkOption { + script = lib.mkOption { type = with lib.types; functionTo str; default = args: '' ${lib.getExe' pkgs.base16-builder-go "base16-builder-go"} \ -schemes-dir ${lib.escapeShellArg args.schemesDir} \ - -template-dir ${lib.escapeShell args.template} + -template-dir ${lib.escapeShell args.templateDir} ''; description = '' A function returning a script to be applied per-template. The function parameter is an attribute set with the following values: - * `template` contains the path to the template. - * `name` is the attribute name of the template. + * `templateDir` contains the path to the template. * `schemesDir` is a path containing all of the schemes as a YAML file (technically a JSON file). + + This is primarily used for generating templates with + `bahaghariUtils.tinted-theming.generateOutputFromSchemes` function. ''; }; };