treewide: properly quote stylix.image when used as a shell argument
Closes: https://github.com/nix-community/stylix/issues/1720
Fixes: 218d4424b0 ("treewide: remove redundant stylix.image Nix store copies (#1659)")
This commit is contained in:
parent
37673b1de0
commit
3499e3ec70
3 changed files with 9 additions and 3 deletions
|
|
@ -134,7 +134,11 @@ in
|
|||
cfg.useWallpaper
|
||||
# Make sure the background image is .png by asking to convert it
|
||||
then
|
||||
"${lib.getExe' pkgs.imagemagick "convert"} ${config.stylix.image} png32:$out/background.png"
|
||||
''
|
||||
${lib.getExe' pkgs.imagemagick "convert"} \
|
||||
${lib.escapeShellArg config.stylix.image} \
|
||||
"png32:$out/background.png"
|
||||
''
|
||||
else
|
||||
"cp ${pixel "base00"} $out/background.png"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ in
|
|||
default = pkgs.runCommand "palette.json" { } ''
|
||||
${lib.getExe cfg.paletteGenerator} \
|
||||
"${cfg.polarity}" \
|
||||
${cfg.image} \
|
||||
${lib.escapeShellArg cfg.image} \
|
||||
"$out"
|
||||
'';
|
||||
};
|
||||
|
|
|
|||
|
|
@ -9,7 +9,9 @@
|
|||
};
|
||||
|
||||
light = fetchurl {
|
||||
name = "three-bicycles.jpg";
|
||||
# Includes a space to make sure the path is properly quoted via
|
||||
# `lib.escapeShellArg` when used as a shell argument.
|
||||
name = "three bicycles.jpg";
|
||||
url = "https://unsplash.com/photos/hwLAI5lRhdM/download?ixid=M3wxMjA3fDB8MXxhbGx8fHx8fHx8fHwxNzE2MzYxNDcwfA&force=true";
|
||||
hash = "sha256-S0MumuBGJulUekoGI2oZfUa/50Jw0ZzkqDDu1nRkFUA=";
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue