When attempting to run anything with graphics that I’ve installed with Nix I get an error. I’m running on a Pop!_OS 20.04 machine ( which is essentially just Ubuntu ).
For example if I run: nix run nixpkgs.glxinfo -c glxinfo:
name of display: :1
Error: couldn't find RGB GLX visual or fbconfig
Or if I run nix run nixpkgs.midori -c midori, I am able to get to the window, but it fails when loading a webpage with this error in the logs:
/build/blender-2.83.1/intern/ghost/intern/GHOST_WindowX11.cpp:206: X11 glXChooseVisual() failed, verify working openGL system!
initial window could not find the GLX extension
Not sure if this makes any difference, but if I create an Appimage inside of a nix-shell that uses webkitgtk ( the same library that midori uses ), the Appimage has the same problem when run outside of the Nix shell ( which probably just makes sense ).
I tried that, but it got the same error. It seems like the error that nixGL solves for is different than the one that I’m getting, but I could still be doing something wrong.
Ah, I was able to use nixGL to get the apps working. The example run command in the README was for bash and I use fish for my shell and had improperly converted the command to the fish equivalent.
But I’ve still got an issue here. I use nix-shell to create a development environment that I can build my Tauri app in. When I build the Tauri app, it creates an AppImage, but that AppImage now requires the nixGLIntel program just to run.
Is there any way to build this into Nix packages or my Nix shell so that my app will run without the user having to use nixGLIntel? It feels like there should be a way to have people depend on a gl nix package that handles this automatically.