vulkan-loader: Always include /run/opengl-driver(-32)/share in search path.

Even though FALLBACK_DATA_DIRS is set to include this, it only applies when XDG_DATA_DIRS is not defined, so the NixOS opengl.nix module still had to include these in the search path. Use a simple patch to force a default search path, consulted after all other search paths.

Note that FALLBACK_DATA_DIRS is no longer set, and the default (/usr/local/share:/usr/share) applies.
This commit is contained in:
Ambroz Bizjak
2019-06-08 20:23:54 +02:00
parent 70de27bbb4
commit bc96146e75
2 changed files with 48 additions and 1 deletions
@@ -21,8 +21,10 @@ stdenv.mkDerivation rec {
buildInputs = [ cmake python3 xlibsWrapper libxcb libXrandr libXext wayland ];
enableParallelBuilding = true;
patches = [ ./system-search-path.patch ];
cmakeFlags = [
"-DFALLBACK_DATA_DIRS=${addOpenGLRunpath.driverLink}/share:/usr/local/share:/usr/share"
"-DSYSTEM_SEARCH_PATH=${addOpenGLRunpath.driverLink}/share"
"-DVULKAN_HEADERS_INSTALL_DIR=${vulkan-headers}"
];