stylix/palette: use derivation arguments instead of string interpolation

Co-authored-by: Matt Sturgeon <matt@sturgeon.me.uk>
(cherry picked from commit 3f6651a26e)
This commit is contained in:
NAHO 2026-01-09 19:39:44 +01:00
parent 5ad96253be
commit ebd522ea7c

View file

@ -80,12 +80,10 @@ in
# and not anything indirect such as filling a template, otherwise
# the output of the palette generator will not be protected from
# garbage collection.
default = pkgs.runCommand "palette.json" { } ''
${lib.getExe cfg.paletteGenerator} \
"${cfg.polarity}" \
${lib.escapeShellArg cfg.image} \
"$out"
'';
default = pkgs.runCommand "palette.json" {
inherit (cfg) image polarity;
nativeBuildInputs = [ cfg.paletteGenerator ];
} ''palette-generator "$polarity" "$image" "$out"'';
};
palette = lib.mkOption {