stylix/palette: coerce derivations to store paths
Coerce derivations to store paths to ensure non-null values are stringified store paths with valid string contexts. Fixes:838df8b8ad("stylix: improve `stylix.image` type (#1414)") Co-authored-by: Matt Sturgeon <matt@sturgeon.me.uk> (cherry picked from commitca1bc329e9)
This commit is contained in:
parent
ebd522ea7c
commit
261d44273b
1 changed files with 1 additions and 3 deletions
|
|
@ -28,10 +28,8 @@ in
|
|||
};
|
||||
|
||||
image = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.path;
|
||||
# Ensure the path is copied to the store
|
||||
apply =
|
||||
value: if value == null || lib.isDerivation value then value else "${value}";
|
||||
type = with lib.types; nullOr (coercedTo path (src: "${src}") pathInStore);
|
||||
description = ''
|
||||
Wallpaper image.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue