opengl: Do VirtualGL preload conditioning on VGL_DISPLAY

Preloading is done by doing a binary patch to the library to add it
as a dependency. The 2.3 series of glibc will let this be done with
just a wrapper that calls ld.so and with the --preload option.
This commit is contained in:
Tyson Whitehead
2019-04-12 11:23:38 -04:00
parent 3825783ee5
commit 7736b409f4
2 changed files with 152 additions and 40 deletions

View File

@@ -3,7 +3,7 @@
# Add a setup hook to the mesa_noglu package that automatically adds
# a libvglfaker.so dependency to executables that depend on libGL.so.
{ super, lib, buildEnv, makeSetupHook, file, bash }:
{ super, lib, buildEnv, makeSetupHook, file, bash, xorg }:
let
autoVirtualGLHook =
@@ -27,7 +27,7 @@ let
makeSetupHook {
name = "insert-virtualgl";
deps = [ file virtualglLib ];
substitutions = { inherit virtualglLib; };
substitutions = { inherit virtualglLib bash; inherit (xorg) libXext; };
} ./insert-virtualgl.sh;
in {