[release-25.11] stylix/palette: allow impure absolute stylix.image path#2150
Conversation
Unfortunately it's not quite that simple.
If you really want the coercion to be undocumented, then you need type = with lib.types; nullOr (
coercedTo path (src: "${src}") path
// { inherit (path) description descriptionClass; }
);However, undocumented coercion can confuse end-users. Imagine we have an option In this case, path-like strings are not copied to store, but path-values are. If a user defines For example, this can break assumptions about relative paths. I might assume I can do
That's up to you. It's certainly valid to resolve the breaking change. It's also valid to consider that breaking change as intentional; it ensures the option is used correctly. |
Agreed. I crucially forgot to mention in my previous message that extending the option description to something as follows is arguably overkill and confusing, meaning it should be fine without extending the description:
Considering the Despite Stylix having no documented backport policy, what about keeping the For reference to end-users, migrating from impure absolute |
84f008d to
ebac86c
Compare
Allow an impure absolute stylix.image path for end-user convenience by relaxing the guarantees established in commits ca1bc32 ("stylix/palette: coerce derivations to store paths") and 61c9f4d ("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.
ebac86c to
aaa4f24
Compare
This PR makes
nix eval .#testbed:alacritty:darkpass with the following test:This undefined feature has been requested in #2134 (comment).
I am fine with adding this because the following task would eventually also remove the store guarantees:
Until then, it would be good to revert the hidden breaking change from commit ca1bc32 ("stylix/palette: coerce derivations to store paths").
CC: @MattSturgeon