diff options
author | Jonathan Ringer <jonringer117@gmail.com> | 2022-02-23 13:09:35 -0800 |
---|---|---|
committer | Jonathan Ringer <jonringer@users.noreply.github.com> | 2022-02-24 08:59:12 -0800 |
commit | d9fe24c1f962ad54957b3ac41f2c4356a1828635 (patch) | |
tree | 9be21acab445a72bbe910d3f392d7d18d262593a /pkgs/games | |
parent | 26c6b2eb794d0bf0f12cb3430b6084bfe2f57d9d (diff) |
steam: use XDG_DATA_DIRS to specify vulkan icd paths
Diffstat (limited to 'pkgs/games')
-rw-r--r-- | pkgs/games/steam/fhsenv.nix | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/pkgs/games/steam/fhsenv.nix b/pkgs/games/steam/fhsenv.nix index 35e8b9838f5a3..eb90c6dd24daa 100644 --- a/pkgs/games/steam/fhsenv.nix +++ b/pkgs/games/steam/fhsenv.nix @@ -243,14 +243,7 @@ in buildFHSUserEnv rec { libvdpau ] ++ steamPackages.steam-runtime-wrapped.overridePkgs) ++ extraLibraries pkgs; - extraBuildCommands = '' - if [ -f $out/usr/share/vulkan/icd.d/nvidia_icd.json ]; then - cp $out/usr/share/vulkan/icd.d/nvidia_icd{,32}.json - nvidia32Lib=$(realpath $out/lib32/libGLX_nvidia.so.0 | cut -d'/' -f-4) - escapedNvidia32Lib="''${nvidia32Lib//\//\\\/}" - sed -i "s/\/nix\/store\/.*\/lib\/libGLX_nvidia\.so\.0/$escapedNvidia32Lib\/lib\/libGLX_nvidia\.so\.0/g" $out/usr/share/vulkan/icd.d/nvidia_icd32.json - fi - '' + (if (!nativeOnly) then '' + extraBuildCommands = if (!nativeOnly) then '' mkdir -p steamrt ln -s ../lib/steam-runtime steamrt/${steam-runtime-wrapped.arch} ${lib.optionalString (steam-runtime-wrapped-i686 != null) '' @@ -263,7 +256,7 @@ in buildFHSUserEnv rec { ${lib.optionalString (steam-runtime-wrapped-i686 != null) '' ln -s /usr/lib32/libbz2.so usr/lib32/libbz2.so.1.0 ''} - ''); + ''; extraInstallCommands = '' mkdir -p $out/share/applications @@ -284,7 +277,8 @@ in buildFHSUserEnv rec { export STEAM_RUNTIME=${if nativeOnly then "0" else "/steamrt"} - export VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/intel_icd.x86_64.json:/usr/share/vulkan/icd.d/intel_icd.i686.json:/usr/share/vulkan/icd.d/lvp_icd.x86_64.json:/usr/share/vulkan/icd.d/lvp_icd.i686.json:/usr/share/vulkan/icd.d/nvidia_icd.json:/usr/share/vulkan/icd.d/nvidia_icd32.json:/usr/share/vulkan/icd.d/radeon_icd.x86_64.json:/usr/share/vulkan/icd.d/radeon_icd.i686.json + # XDG_DATA_DIRS is used by pressure-vessel and vulkan loaders to find the corresponding icd + export XDG_DATA_DIRS=$XDG_DATA_DIRS''${XDG_DATA_DIRS:+:}/run/opengl-driver/share:/run/opengl-driver-32/share '' + extraProfile; runScript = writeScript "steam-wrapper.sh" '' |