allow non-trivial expressions in flakes#15132
Conversation
Signed-off-by: cinereal <[email protected]>
|
I don't think this is a good idea. It's very predictable that people are going to abuse this in horrible ways, such as doing IFD during the computation of the inputs. So commands like |
|
thanks for the feedback - i'll close then. |
|
@edolstra what we are sure of is that allowing full nix for flakes input would allow for such incorrect behavior But are we sure that the current subset of nix allowed for flakes inputs (basically just static strings) is the only safe option? Would it not be possible to allow for more, safe expressions (still making it a subset of nix instead of full nix) without introducing such risks? |
|
I'm not convinced that Flakes users need to be patronized in this way, or that IFD is particularly problematic here. |
|
#15132 (comment) from @roberth :
This is a strong argument; |
A good question how would stuff like the flake.lock would work in this case if it's unsafe and still will give you IFD? Like it has to import the |
|
Depends, is there a way to ensure that an expression evaluates finally to a static string not requiring IFD? |
lifts flakes' restriction allowing the use of only trivial syntax, which has particularly affected its
inputs.Motivation
inputs, came up as an alternative approach that came up in [RFC 0193] TOML Flakes rfcs#193.inputsyet still allowing to override dependencies using the flakes interfaces (CLI flag--override-input,inputsattribute.follows) as well - sort of as a reverseflake-compat.url = "file:/dev/null";worksContext
inputssection using some function call while simultaneously using tools to write to inputs to update them.)