nh icon indicating copy to clipboard operation
nh copied to clipboard

``nh <cmd> repl`` does not work

Open imvaskel opened this issue 8 months ago • 5 comments

It seems that on Lix version 2.92 (not sure if this occurs before), any of the repl commands do not work. This is because to use a flake in the repl loadable, you need the experimental feature repl-flake. This requirement is not mentioned anywhere. I think that it should either inform the user that that feature is needed or just pass the experimental feature itself.

imvaskel avatar Mar 12 '25 17:03 imvaskel

Indeed. Maybe autoconfiguring the child nix process is debatable, but at least nh should show a warning.

viperML avatar Mar 12 '25 18:03 viperML

I'm looking at adding this in, is running nix config show and parsing out the JSON a good approach for reading the experimental features?

imvaskel avatar Mar 14 '25 17:03 imvaskel

Yeah, I was thinking the same. It shouldn't add much overhead, and there's no need to parse the whole json, just what we need

viperML avatar Mar 14 '25 17:03 viperML

So there seems to be an issue with this approach: I am running Lix 2.92 and they seem to have changed the command to return a bit enum of the experimental features, while Lix <2.92 and Nix just return an array of the enabled features.

imvaskel avatar Mar 14 '25 17:03 imvaskel

After further consideration, I don't think that it is worth it to add a check within the code, maybe some sort of FAQ entry about this is the best approach?

imvaskel avatar Mar 17 '25 16:03 imvaskel