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:
parent
5ad96253be
commit
ebd522ea7c
1 changed files with 4 additions and 6 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue