about summary refs log tree commit diff
path: root/pkgs/games
diff options
context:
space:
mode:
authorJonathan Ringer <jonringer117@gmail.com>2022-02-02 14:38:55 -0800
committerJonathan Ringer <jonringer@users.noreply.github.com>2022-03-02 12:25:45 -0800
commitfae860361ee35e1e7cefa6c93857ce2fc3cc3500 (patch)
tree14bb827b5da74a8388fa6101afc2f89f0a97313f /pkgs/games
parent671a068a0166a5474e51b4d151b64250f8feaec8 (diff)
downloadnixlib-fae860361ee35e1e7cefa6c93857ce2fc3cc3500.tar
nixlib-fae860361ee35e1e7cefa6c93857ce2fc3cc3500.tar.gz
nixlib-fae860361ee35e1e7cefa6c93857ce2fc3cc3500.tar.bz2
nixlib-fae860361ee35e1e7cefa6c93857ce2fc3cc3500.tar.lz
nixlib-fae860361ee35e1e7cefa6c93857ce2fc3cc3500.tar.xz
nixlib-fae860361ee35e1e7cefa6c93857ce2fc3cc3500.tar.zst
nixlib-fae860361ee35e1e7cefa6c93857ce2fc3cc3500.zip
steam: remove nativeOnly options
Diffstat (limited to 'pkgs/games')
-rw-r--r--pkgs/games/steam/fhsenv.nix72
1 files changed, 12 insertions, 60 deletions
diff --git a/pkgs/games/steam/fhsenv.nix b/pkgs/games/steam/fhsenv.nix
index 447ff94bf9d3..e54e87bf48b8 100644
--- a/pkgs/games/steam/fhsenv.nix
+++ b/pkgs/games/steam/fhsenv.nix
@@ -3,7 +3,6 @@
 , extraPkgs ? pkgs: [ ] # extra packages to add to targetPkgs
 , extraLibraries ? pkgs: [ ] # extra packages to add to multiPkgs
 , extraProfile ? "" # string to append to profile
-, nativeOnly ? false
 , runtimeOnly ? false
 , runtimeShell
 , stdenv
@@ -51,7 +50,6 @@ let
   # Zachtronics and a few other studios expect STEAM_LD_LIBRARY_PATH to be present
   exportLDPath = ''
     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"
   '';
 
   # bootstrap.tar.xz has 444 permissions, which means that simple deletes fail
@@ -62,22 +60,6 @@ let
     fi
   '';
 
-  setupSh = writeScript "setup.sh" ''
-    #!${runtimeShell}
-  '';
-
-  runSh = writeScript "run.sh" ''
-    #!${runtimeShell}
-    runtime_paths="${lib.concatStringsSep ":" ldPath}"
-    if [ "$1" == "--print-steam-runtime-library-paths" ]; then
-      echo "$runtime_paths''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH"
-      exit 0
-    fi
-    export LD_LIBRARY_PATH="$runtime_paths''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH"
-    export STEAM_LD_LIBRARY_PATH="$STEAM_LD_LIBRARY_PATH''${STEAM_LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH"
-    exec "$@"
-  '';
-
 in buildFHSUserEnv rec {
   name = "steam";
 
@@ -123,7 +105,6 @@ in buildFHSUserEnv rec {
     gtk3
     dbus
     zlib
-    glib
     atk
     cairo
     freetype
@@ -149,9 +130,6 @@ in buildFHSUserEnv rec {
     openssl_1_1
     rtmpdump
 
-    # needed by getcap for vr startup
-    libcap
-
     # dependencies for mesa drivers, needed inside pressure-vessel
     mesa.drivers
     mesa.llvmPackages.llvm.lib
@@ -163,44 +141,30 @@ in buildFHSUserEnv rec {
     xorg.libxshmfence
     xorg.libXxf86vm
     libelf
-  ] ++ (if (!nativeOnly) then [
-    (steamPackages.steam-runtime-wrapped.override {
-      inherit runtimeOnly;
-    })
-  ] else [
+
     # Required
     glib
     gtk2
     bzip2
-    zlib
-    gdk-pixbuf
 
     # Without these it silently fails
     xorg.libXinerama
-    xorg.libXdamage
     xorg.libXcursor
     xorg.libXrender
     xorg.libXScrnSaver
-    xorg.libXxf86vm
     xorg.libXi
     xorg.libSM
     xorg.libICE
     gnome2.GConf
-    freetype
     (curl.override { gnutlsSupport = true; opensslSupport = false; })
     nspr
     nss
-    fontconfig
-    cairo
-    expat
-    dbus
     cups
     libcap
     SDL2
     libusb1
     dbus-glib
     ffmpeg
-    atk
     # Only libraries are needed from those two
     libudev0-shim
     networkmanager098
@@ -208,7 +172,6 @@ in buildFHSUserEnv rec {
     # Verified games requirements
     xorg.libXt
     xorg.libXmu
-    xorg.libxcb
     libogg
     libvorbis
     SDL
@@ -216,7 +179,6 @@ in buildFHSUserEnv rec {
     glew110
     libidn
     tbb
-    wayland
 
     # Other things from runtime
     flac
@@ -242,21 +204,14 @@ in buildFHSUserEnv rec {
     librsvg
     xorg.libXft
     libvdpau
-  ] ++ steamPackages.steam-runtime-wrapped.overridePkgs) ++ extraLibraries pkgs;
-
-  extraBuildCommands = if (!nativeOnly) then ''
-    mkdir -p steamrt
-    ln -s ../lib/steam-runtime steamrt/${steam-runtime-wrapped.arch}
-    ${lib.optionalString (steam-runtime-wrapped-i686 != null) ''
-      ln -s ../lib32/steam-runtime steamrt/${steam-runtime-wrapped-i686.arch}
-    ''}
-    ln -s ${runSh} steamrt/run.sh
-    ln -s ${setupSh} steamrt/setup.sh
-  '' else ''
+  ]
+  ++ steamPackages.steam-runtime-wrapped.overridePkgs
+  ++ extraLibraries pkgs;
+
+  extraBuildCommands = ''
     ln -s /usr/lib/libbz2.so usr/lib/libbz2.so.1.0
-    ${lib.optionalString (steam-runtime-wrapped-i686 != null) ''
-      ln -s /usr/lib32/libbz2.so usr/lib32/libbz2.so.1.0
-    ''}
+  '' + lib.optionalString (steam-runtime-wrapped-i686 != null) ''
+    ln -s /usr/lib32/libbz2.so usr/lib32/libbz2.so.1.0
   '';
 
   extraInstallCommands = ''
@@ -276,8 +231,6 @@ in buildFHSUserEnv rec {
       fi
     fi
 
-    export STEAM_RUNTIME=${if nativeOnly then "0" else "/steamrt"}
-
     # 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;
@@ -300,14 +253,13 @@ in buildFHSUserEnv rec {
     EOF
       fi
     fi
-    ${lib.optionalString (!nativeOnly) exportLDPath}
+
+    export STEAM_LD_LIBRARY_PATH="$STEAM_LD_LIBRARY_PATH''${STEAM_LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH"
     ${fixBootstrap}
     exec steam "$@"
   '';
 
-  meta = steam.meta // {
-    broken = nativeOnly;
-  };
+  inherit (steam) meta;
 
   # allows for some gui applications to share IPC
   # this fixes certain issues where they don't render correctly
@@ -334,7 +286,7 @@ in buildFHSUserEnv rec {
         exit 1
       fi
       shift
-      ${lib.optionalString (!nativeOnly) exportLDPath}
+      export STEAM_LD_LIBRARY_PATH="$STEAM_LD_LIBRARY_PATH''${STEAM_LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH"
       ${fixBootstrap}
       exec -- "$run" "$@"
     '';