diff options
author | Alyssa Ross <hi@alyssa.is> | 2019-07-14 15:50:11 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2019-08-14 00:01:17 +0000 |
commit | 69a15dd2dc85051ba1436613805f9286850e0596 (patch) | |
tree | d53cec2bb5b8d07df1d1919b212cb2deb3628cd6 /nixpkgs/pkgs/development/libraries/vulkan-loader | |
parent | 6941276da135c3eb3b50e0be33d92e7d01ccba9a (diff) | |
parent | beff2f8d75ef2c65017fb25e251337c6bb2e950d (diff) | |
download | nixlib-69a15dd2dc85051ba1436613805f9286850e0596.tar nixlib-69a15dd2dc85051ba1436613805f9286850e0596.tar.gz nixlib-69a15dd2dc85051ba1436613805f9286850e0596.tar.bz2 nixlib-69a15dd2dc85051ba1436613805f9286850e0596.tar.lz nixlib-69a15dd2dc85051ba1436613805f9286850e0596.tar.xz nixlib-69a15dd2dc85051ba1436613805f9286850e0596.tar.zst nixlib-69a15dd2dc85051ba1436613805f9286850e0596.zip |
Merge commit 'beff2f8d75ef2c65017fb25e251337c6bb2e950d'
v# modified: nixpkgs/pkgs/tools/networking/dhcpcd/default.nix
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/vulkan-loader')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/vulkan-loader/default.nix | 4 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/libraries/vulkan-loader/system-search-path.patch | 45 |
2 files changed, 48 insertions, 1 deletions
diff --git a/nixpkgs/pkgs/development/libraries/vulkan-loader/default.nix b/nixpkgs/pkgs/development/libraries/vulkan-loader/default.nix index 891ad373e027..a44e91e1bf5c 100644 --- a/nixpkgs/pkgs/development/libraries/vulkan-loader/default.nix +++ b/nixpkgs/pkgs/development/libraries/vulkan-loader/default.nix @@ -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}" ]; diff --git a/nixpkgs/pkgs/development/libraries/vulkan-loader/system-search-path.patch b/nixpkgs/pkgs/development/libraries/vulkan-loader/system-search-path.patch new file mode 100644 index 000000000000..26f83e6d534f --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/vulkan-loader/system-search-path.patch @@ -0,0 +1,45 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9ac5ce835..cbdb0ff56 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -88,6 +88,12 @@ if(UNIX) + STRING + "Search path to use when XDG_DATA_DIRS is unset or empty or the current process is SUID/SGID. Default is freedesktop compliant." + ) ++ set( ++ SYSTEM_SEARCH_PATH "" ++ CACHE ++ STRING ++ "Search path to always use, after all other search paths." ++ ) + endif() + + if(UNIX AND NOT APPLE) # i.e.: Linux +@@ -184,6 +190,7 @@ if(UNIX) + add_definitions(-DFALLBACK_CONFIG_DIRS="${FALLBACK_CONFIG_DIRS}") + add_definitions(-DFALLBACK_DATA_DIRS="${FALLBACK_DATA_DIRS}") + add_definitions(-DSYSCONFDIR="${CMAKE_INSTALL_FULL_SYSCONFDIR}") ++ add_definitions(-DSYSTEM_SEARCH_PATH="${SYSTEM_SEARCH_PATH}") + + # Make sure /etc is searched by the loader + if(NOT (CMAKE_INSTALL_FULL_SYSCONFDIR STREQUAL "/etc")) +diff --git a/loader/loader.c b/loader/loader.c +index 0d3b5a947..abe357004 100644 +--- a/loader/loader.c ++++ b/loader/loader.c +@@ -3688,6 +3688,7 @@ static VkResult ReadDataFilesInSearchPaths(const struct loader_instance *inst, e + search_path_size += DetermineDataFilePathSize(xdgdatahome, rel_size); + search_path_size += DetermineDataFilePathSize(home_root, rel_size); + } ++ search_path_size += DetermineDataFilePathSize(SYSTEM_SEARCH_PATH, rel_size); + #endif + } + } +@@ -3737,6 +3738,7 @@ static VkResult ReadDataFilesInSearchPaths(const struct loader_instance *inst, e + CopyDataFilePath(xdgdatahome, relative_location, rel_size, &cur_path_ptr); + CopyDataFilePath(home_root, relative_location, rel_size, &cur_path_ptr); + } ++ CopyDataFilePath(SYSTEM_SEARCH_PATH, relative_location, rel_size, &cur_path_ptr); + } + + // Remove the last path separator |