stylix/palette: allow impure absolute stylix.image path (#2150)
Allow an impure absolute stylix.image path for end-user convenience by relaxing the guarantees established in commitsca1bc329e9("stylix/palette: coerce derivations to store paths") and61c9f4dd14("treewide: remove redundant stylix.image escaping and string coercion"). When stylix.image cannot be copied to the store, it is not guaranteed to be a stringified store path with a valid string context and no special characters, resulting in UB. Link: https://github.com/nix-community/stylix/pull/2150 Reviewed-by: Matt Sturgeon <matt@sturgeon.me.uk> Reviewed-by: 0xda157 <da157@voidq.com>
This commit is contained in:
parent
296aa01b46
commit
05e53b52b6
1 changed files with 8 additions and 1 deletions
|
|
@ -29,7 +29,14 @@ in
|
|||
|
||||
image = lib.mkOption {
|
||||
# Ensure the path is copied to the store
|
||||
type = with lib.types; nullOr (coercedTo path (src: "${src}") pathInStore);
|
||||
type =
|
||||
with lib.types;
|
||||
nullOr (
|
||||
coercedTo path (src: "${src}") path
|
||||
// {
|
||||
inherit (path) description descriptionClass;
|
||||
}
|
||||
);
|
||||
description = ''
|
||||
Wallpaper image.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue