You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
roberth opened this issue
Jan 21, 2023
· 1 comment
Labels
cliThe old and/or new command line interfacefeatureFeature request or proposalnew-cliRelating to the "nix" commandreplThe Read Eval Print Loop, "nix repl" command and debugger
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Sometimes I just want to paste a string into my shell and run it.
For example
nix-repl> config.system.activationScripts.check-manual-docbook
"if [[ $(cat /nix/store/zvzbmg408jbb7x60kdwndfv68x7mlcnj-options-used-docbook) = 1 ]]; then\n echo -e \"\\e[31mwarning\\e[0m: This configuration contains option documentation in docbook.\" \\\n \"Support for docbook is deprecated and will be removed after NixOS 23.05.\" \\\n \"See nix-store --read-log /nix/store/6vknjm2hbvqpwql7qp1dxhg4hbq5hs26-options.json.drv\"\nfi\n"
nix-repl> :b config.system.activationScripts.check-manual-docbook
error: expression does not evaluate to a derivation, so I can't build it
Describe the solution you'd like
In the repl, when :b evaluates its argument to a string, continue to build the string context. Maybe print the raw string? (ie not in string literal syntax)
In the cli, add a flag to build a string? An nix eval flag? A nix build flag?
a. Keep digging through toplevel instead of building the option I wish to inspect.
b. Write ad hoc script builder in the repl. This is not the same, as the result is a bit harder to read, and the script derivation is slightly cumbersome to write.
cliThe old and/or new command line interfacefeatureFeature request or proposalnew-cliRelating to the "nix" commandreplThe Read Eval Print Loop, "nix repl" command and debugger
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Sometimes I just want to paste a string into my shell and run it.
For example
Describe the solution you'd like
In the repl, when
:b
evaluates its argument to a string, continue to build the string context. Maybe print the raw string? (ie not in string literal syntax)In the cli, add a flag to build a string? An
nix eval
flag? Anix build
flag?e.g.
or perhaps something like
or something like
--print=raw
or--print=json
.Describe alternatives you've considered
a. Keep digging through
toplevel
instead of building the option I wish to inspect.b. Write ad hoc script builder in the repl. This is not the same, as the result is a bit harder to read, and the script derivation is slightly cumbersome to write.
Additional context
Priorities
Add 👍 to issues you find important.
The text was updated successfully, but these errors were encountered: