summary refs log tree commit diff
path: root/pkgs/games/steam/runtime-wrapped.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/games/steam/runtime-wrapped.nix')
-rw-r--r--pkgs/games/steam/runtime-wrapped.nix20
1 files changed, 15 insertions, 5 deletions
diff --git a/pkgs/games/steam/runtime-wrapped.nix b/pkgs/games/steam/runtime-wrapped.nix
index 3d614bda31e4..1ec9fc7d5d97 100644
--- a/pkgs/games/steam/runtime-wrapped.nix
+++ b/pkgs/games/steam/runtime-wrapped.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, perl, pkgs, steam-runtime
+{ stdenv, steamArch, lib, perl, pkgs, steam-runtime
 , nativeOnly ? false
 , runtimeOnly ? false
 }:
@@ -96,6 +96,13 @@ let
 
   allPkgs = ourRuntime ++ steamRuntime;
 
+  gnuArch = if steamArch == "amd64" then "x86_64-linux-gnu"
+            else if steamArch == "i386" then "i386-linux-gnu"
+            else abort "Unsupported architecture";
+
+  libs = [ "lib/${gnuArch}" "lib" "usr/lib/${gnuArch}" "usr/lib" ];
+  bins = [ "bin" "usr/bin" ];
+
 in stdenv.mkDerivation rec {
   name = "steam-runtime-wrapped";
 
@@ -103,10 +110,13 @@ in stdenv.mkDerivation rec {
 
   builder = ./build-wrapped.sh;
 
+  passthru = {
+    inherit gnuArch libs bins;
+    arch = steamArch;
+  };
+
   installPhase = ''
-    buildDir "${toString steam-runtime.libs}" "${toString (map lib.getLib allPkgs)}"
-    buildDir "${toString steam-runtime.bins}" "${toString (map lib.getBin allPkgs)}"
+    buildDir "${toString libs}" "${toString (map lib.getLib allPkgs)}"
+    buildDir "${toString bins}" "${toString (map lib.getBin allPkgs)}"
   '';
-
-  meta.hydraPlatforms = [];
 }