Implement --raw for nix-instantiate --eval
Motivation
For ages now I've been doing hacks like
nix-instantiate --eval <something> | tr -d \"
# Or
nix-instantiate --eval <something> | jq -r .
to get to the raw string content in the stable CLI.
Today I've had enough and went on to implement --raw within like 10 minutes and only a single compilation error.
Context
nix eval already supports --raw.
Implements --raw for nix-instantiate:
$ nix-instantiate --eval --raw --expr '"hello"'
hello
Not yet documented or tested.
On one hand the Nix team might be inclined to reject this because it changes the old CLI when you're trying to focus on the new one.
On the other hand, this is a 6 line change..
Priorities
Add :+1: to pull requests you find important.
This seems fine to me.
On one hand the Nix team might be inclined to reject this because it changes the old CLI when you're trying to focus on the new one.
I think while we shouldn't prioritize these things, if someone is willing to put in the work we shouldn't stop them either.
I agree with John, but also I would use this.
See, now we're even discussing the new CLI, which actually is a priority.
This would improve the documentation as well
- https://github.com/NixOS/nix/pull/10708#discussion_r1606810865
@infinisil are you still interested in completing this PR?
Interested yes, but not sufficient availability right now :)
I think this would be a great to label/advertise as a first good issue :)
As discussed in #dev:nixos.org I went ahead and picked this up in #12119.
@not-my-profile Thank you! ❤️