-
-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use flake --impure example is wrong #181
Comments
What doesn't work for you? Can you share the flake you're trying to get working? I can attest to it working locally. We have a flake that simply aborts execution if it is missing a particular environment variable (so |
Here's a demo: https://gitlab.com/scvalex/direnv-flake-impure-demo The
If you change the If you change the |
What I was trying to get working was |
Thank you for a test case! I'll have to test this on a different machine than is my default macOS testbed, but I will get back to you on this this evening. |
It turns out I don't actually need |
So I tested this out this morning (making promises to open source projects when I have a 2.5 year old at home is always a mistake...), and it all seems working with a fresh checkout of nix-direnv and a checkout of the demo repo you sent across. My process:
Unfortunately, I don't have the time to debug old versions of this tool to see how it might be broken in older revisions. If you're interested, I might suggest the inclusion of a |
Thanks for looking into it. I updated to NixOS-22.05 with Nix 2.8.1, and I can no longer reproduce this. I guess it must've been something with the old nix version, or something with my 21.11 install. Closing. |
The README says to use
echo "use flake . --impure" > .envrc
.Experimentally, that doesn't work, but removing the dot does. So, having
use flake --impure
in my.envrc
works. "Works" here means I was able to start a devShell with nixGL in it. I don't understand how nix-direnv works exactly, so I don't know if the README was always wrong, if if became wrong with some nix version, or if I'm mistaken about what I'm seeing.The text was updated successfully, but these errors were encountered: