about summary refs log tree commit diff
path: root/pkgs/games
diff options
context:
space:
mode:
authorJonathan Ringer <jonringer117@gmail.com>2020-12-20 12:31:27 -0800
committerJonathan Ringer <jonringer@users.noreply.github.com>2020-12-20 22:38:18 -0800
commit0179b5f17392f3e61d2b5af2ef3f741fbf72a3f3 (patch)
tree7e221dd6b4554b3bbd6df1c8d0968ca2f9aa2f41 /pkgs/games
parent0446b8af52a4c3af59386d3808b1f250c7ad6745 (diff)
downloadnixlib-0179b5f17392f3e61d2b5af2ef3f741fbf72a3f3.tar
nixlib-0179b5f17392f3e61d2b5af2ef3f741fbf72a3f3.tar.gz
nixlib-0179b5f17392f3e61d2b5af2ef3f741fbf72a3f3.tar.bz2
nixlib-0179b5f17392f3e61d2b5af2ef3f741fbf72a3f3.tar.lz
nixlib-0179b5f17392f3e61d2b5af2ef3f741fbf72a3f3.tar.xz
nixlib-0179b5f17392f3e61d2b5af2ef3f741fbf72a3f3.tar.zst
nixlib-0179b5f17392f3e61d2b5af2ef3f741fbf72a3f3.zip
steam-fhsenv: normalize ldPath
Diffstat (limited to 'pkgs/games')
-rw-r--r--pkgs/games/steam/fhsenv.nix11
1 files changed, 7 insertions, 4 deletions
diff --git a/pkgs/games/steam/fhsenv.nix b/pkgs/games/steam/fhsenv.nix
index 6f9d13671dc4..e15532443ba6 100644
--- a/pkgs/games/steam/fhsenv.nix
+++ b/pkgs/games/steam/fhsenv.nix
@@ -6,6 +6,7 @@
 , nativeOnly ? false
 , runtimeOnly ? false
 , runtimeShell
+, stdenv
 
 # DEPRECATED
 , withJava ? config.steam.java or false
@@ -43,12 +44,14 @@ let
       ++ lib.optional withPrimus primus
       ++ extraPkgs pkgs;
 
-  ldPath = map (x: "/steamrt/${steam-runtime-wrapped.arch}/" + x) steam-runtime-wrapped.libs
-           ++ lib.optionals (steam-runtime-wrapped-i686 != null) (map (x: "/steamrt/${steam-runtime-wrapped-i686.arch}/" + x) steam-runtime-wrapped-i686.libs);
+  ldPath = lib.optionals stdenv.is64bit [ "/lib64" ]
+  ++ [ "/lib32" ]
+  ++ map (x: "/steamrt/${steam-runtime-wrapped.arch}/" + x) steam-runtime-wrapped.libs
+  ++ lib.optionals (steam-runtime-wrapped-i686 != null) (map (x: "/steamrt/${steam-runtime-wrapped-i686.arch}/" + x) steam-runtime-wrapped-i686.libs);
 
   # Zachtronics and a few other studios expect STEAM_LD_LIBRARY_PATH to be present
   exportLDPath = ''
-    export LD_LIBRARY_PATH=/lib32:/lib64:${lib.concatStringsSep ":" ldPath}''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH
+    export LD_LIBRARY_PATH=${lib.concatStringsSep ":" ldPath}''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH
     export STEAM_LD_LIBRARY_PATH="$STEAM_LD_LIBRARY_PATH''${STEAM_LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH"
   '';
 
@@ -58,7 +61,7 @@ let
 
   runSh = writeScript "run.sh" ''
     #!${runtimeShell}
-    runtime_paths="/lib32:/lib64:${lib.concatStringsSep ":" ldPath}"
+    runtime_paths="${lib.concatStringsSep ":" ldPath}"
     if [ "$1" == "--print-steam-runtime-library-paths" ]; then
       echo "$runtime_paths''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH"
       exit 0