Providing opengl-driver to a program

In order to make my program work I need to set the environment variable LD_LIBRARY_PATH=/run/opengl-driver/lib/ before running it, otherwise I get GLFWError (API_UNAVAILABLE): GLX: No GLXFBConfigs returned. I find this envvar setting rather awkward.

I tried putting LD_LIBRARY_PATH="/run/opengl-driver/lib/" in the mkDerivation call but that’s still somewhat suboptimal aesthetically and didn’t actually work.

Is there a better way?

Are you looking for something like nixGL?

1 Like