-
- Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
Is your feature request related to a problem? Please describe.
It's currently impractical to evaluate local paths using --pure-eval, a stable feature.
It can be done, but it needs like 20 lines of shell code to tell Nix which local paths can be used: https://gist.github.com/infinisil/6bd89c9fb5e66b635bd30fa9ae5b7bf6#file-nix-instantiate-pure-L5-L26
This gets you more or less the same --pure-eval power as the current Flake CLI.
Describe the solution you'd like
Make --pure-eval mode practically usable for nix- and nix -f CLIs by building the above functionality into the commands directly.
This is backwards compatible, because it would only change behavior when --pure-eval is enabled and paths are passed, which currently always gives an error.
Describe alternatives you've considered
A pure evaluation primop, some brainstorming for which can be seen in https://github.com/tweag/epcb.
Additional context
Slightly related is #5868, which would allow making the shell-based implementation nicer.
Priorities
Add 👍 to issues you find important.