Repository navigation
Conversation
| d) If you are using `nix run`, in addition to one of the fixes above, you | ||
| may need to use the `--impure` flag as well. |
There was a problem hiding this comment.
| d) If you are using `nix run`, in addition to one of the fixes above, you | |
| may need to use the `--impure` flag as well. | |
| d) If you are using nix unstable commands, in addition to one of the fixes above, you | |
| may need to use the `--impure` flag as well. |
Not sure the best way to word that, but this applies to build, run, shell and other unstable commands.
There was a problem hiding this comment.
Is that part of nix-command or flakes experimental feature?
There was a problem hiding this comment.
I'm not sure, one of them makes all evaluation pure by default. I think its flakes experimental feature. But usually you enable both, so I don't know.
There was a problem hiding this comment.
Sorry for the delay, @Pacman99, and thank you for the review.
I tried to make the information more comprehensive (ade15a5), but I also don't know the answer to @SuperSandro2000's question, so am not totally sure how best to phrase it. Please take a look at my update and let me know what you think.
Thanks!
There was a problem hiding this comment.
I consider the examples problematic, run and build exist for 2.3 as well, and shell also IIRC.
Can't you say "in a pre release version of nix"?
There was a problem hiding this comment.
@NobbZ, could you maybe provide some example wording? I'm not sure how to update the text to resolve your concerns.
There was a problem hiding this comment.
"If you are using a prerelease version of nix (eg. flake enabled), you need to use the --impure flag in combination with solution a) or c)"
|
@Pacman99, what else should I do to get this ready for merge? |
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
Co-authored-by: Jonathan Ringer <[email protected]>
|
I don't like this change. I'd much rather see this warning instruct people on how to do the right thing with pure-eval, rather than just encouraging more indirect overriding of internal behavior. I can see it now - someone will do this and then wind up including more impurity than they'd wanted to and then being confused why allowing unfree with |
I'm getting a lot of conflicting advice on this PR and would like some help in knowing which direction is best for everyone. For my part, I found the existing help text to be both unhelpful and, after diving into things, inaccurate, so I was trying to improve both aspects in the way that minimally made me able to function. I'm not aware in general of how to "do the right thing with pure-eval"; would you mind pointing me towards some resources that explain it? Related request: would you mind prompting me towards what sort of help text you think would be better? If we could form some consensus on this, I think that would be great. As it stands, I don't have enough knowledge to understand how best to improve the error message here. Thanks everyone! |
|
The "right" thing, is often considered a wrapping flake, that imports This is something I do not like though, as it requires a lot of work, especially if you want to have some certain commit of
|
This confirms my own intuition: the "right thing" is some deeper action that is bulky to perform and requires a lot of understanding of theory; the thing that lets me continue being productive in my environment immediately is using the |
|
@jonringer, thanks again for your input on the help text. I am not sure what else to do to get this reviewed and merged. Can you help push this along? |
|
I marked this as stale due to inactivity. → More info |
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
|
Similar thing was already done in 7bea56b |
Motivation for this change
Attempting to run
postmanvianix run nixpkgs#postman, I got an error message about unfree packages, but the mitigations listed weren't helping. With some discussion from this discourse topic, I understood that I needed the--impure flag, but the error message does not mention that.This PR just adds a bit of text to that error message block about instituting one of the recommended fixes, then making sure to use
--impurewithnix run.I am not sure how to test this change; some help with that would be appreciated.
Closes #116340.
Things done
sandboxinnix.confon non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"./result/bin/)nix path-info -Sbefore and after)