Open jacg opened 2 years ago
It should be pkgs.nixgl.auto.nixGLDefault
.
It should be
pkgs.nixgl.auto.nixGLDefault
.
pkgs.nixgl.auto.nixGLDefault # copy-paste from MY message
pkgs.nixgl.auto.nixGLDefault # copy-paste from YOUR reply
If there is a difference between what you wrote and what I wrote, then I can't spot it.
Copy-pasting your version into my local Nix expression gives exactly the same error as before.
Same issue here.
Did you pass --impure
?
I was using the devShell
via direnv and use flake
.
nix develop
fails with the same error.nix develop --impure
succeeds.Is there a way to get it to work with direnv
?
You would need to tell devShell to be impure. Not sure how to do that.
So I ended up simply using nixGLIntel directly to stay pure.
You would need to tell devShell to be impure. Not sure how to do that.
You can tell direnv to use the flake impurely. Just put this in your .envrc
: use flake --impure
.
Although, once you do have an impure flake in your direnv, I don't know how to get it to re-evaluate when flake.nix
is changed. Using nixGLIntel
definitely works without the impure.
Thank you for the ticket and for the discussion.
Could we consider this as closed?
Perhaps we can improve the documentation to state that we need to use --impure
for Nvidia drivers?
Sorry, it's been a while since I've thought about this, and I don't have time right now to go over it and refresh my memory and check details. With that said, a quick read suggests that it seems reasonable to consider this closed.
hey there, relatively new user here, thank you for the awesome project! it did (and continues to) save my bacon with flaky gui frameworks that I happen to be using.
I have been following this thread for a little while as I had a similar issue/requirement - I wanted to provide the nixGL
(not nixGLIntel
or any of the specific ones) command in my flake for easier collaboration (and since there is no way to do that as of now - without using --impure
, apparently - , I just left notes in my flake pointing to this thread).
the reason I wanted nixGL
was to be able to use it on any GPU platform, relying on its auto-detection capabilities without the need to explicitly specify the right command for the right platform (I feel that is kind of the point of nixGLDefault
).
Perhaps we can improve the documentation to state that we need to use
--impure
for Nvidia drivers?
in my opinion it would also help to note that using just nixGL
(via nixGLDefault
) in a flake won't work without --impure
(as it is now), just the same as the nvidia variant you mention.
right, just my 2c.
Thank you for the comment @wULLSnpAXbWZGYDYyhWTKKspEQoaYxXyhoisqHf
The point of nixGLDefault
is clearly to auto detect, however all of that is only possible in --impure
mode and when ran locally.
I'll add details in the doc.
Just to clarify for https://github.com/versotile-org/verso/pull/155 -> Is there a way to have a flake-based nix shell that is pure and has a working GL on a non-NixOS systems with nix?
Halcyon Days of Old
Many moons ago I used
and
buildInputs = [ nixGL.nixGLDefault ];
to provide the
nixGL
command which automatically picked the correct implementation for whatever hardware I happened to be running.Harsh and Cruel Present
Now I'm trying to provide
nixGL
in a flake, roughly like thisand I get the errors shown in the comments.
How should I go about providing
nixGL
in adevShell
?