steam: cut dependencies when using Runtime, migrate from config to boolean arguments
This commit is contained in:
parent
a3ef4b930e
commit
8b218b7143
@ -1,4 +1,8 @@
|
|||||||
{ lib, buildFHSUserEnv, config }:
|
{ lib, buildFHSUserEnv
|
||||||
|
, withRuntime ? false
|
||||||
|
, withJava ? false
|
||||||
|
, withPrimus ? false
|
||||||
|
}:
|
||||||
|
|
||||||
buildFHSUserEnv {
|
buildFHSUserEnv {
|
||||||
name = "steam";
|
name = "steam";
|
||||||
@ -12,12 +16,12 @@ buildFHSUserEnv {
|
|||||||
pkgs.xlibs.xrandr
|
pkgs.xlibs.xrandr
|
||||||
pkgs.which
|
pkgs.which
|
||||||
]
|
]
|
||||||
++ lib.optional (config.steam.java or false) pkgs.jdk
|
++ lib.optional withJava pkgs.jdk
|
||||||
++ lib.optional (config.steam.primus or false) pkgs.primus
|
++ lib.optional withPrimus pkgs.primus
|
||||||
;
|
;
|
||||||
|
|
||||||
multiPkgs = pkgs:
|
multiPkgs = pkgs: [
|
||||||
[ # These are required by steam with proper errors
|
# These are required by steam with proper errors
|
||||||
pkgs.xlibs.libXcomposite
|
pkgs.xlibs.libXcomposite
|
||||||
pkgs.xlibs.libXtst
|
pkgs.xlibs.libXtst
|
||||||
pkgs.xlibs.libXrandr
|
pkgs.xlibs.libXrandr
|
||||||
@ -32,6 +36,10 @@ buildFHSUserEnv {
|
|||||||
pkgs.libpulseaudio
|
pkgs.libpulseaudio
|
||||||
pkgs.gdk_pixbuf
|
pkgs.gdk_pixbuf
|
||||||
|
|
||||||
|
# Not formally in runtime but needed by some games
|
||||||
|
pkgs.gst_all_1.gstreamer
|
||||||
|
pkgs.gst_all_1.gst-plugins-ugly
|
||||||
|
] ++ lib.optionals withRuntime [
|
||||||
# Without these it silently fails
|
# Without these it silently fails
|
||||||
pkgs.xlibs.libXinerama
|
pkgs.xlibs.libXinerama
|
||||||
pkgs.xlibs.libXdamage
|
pkgs.xlibs.libXdamage
|
||||||
@ -97,10 +105,6 @@ buildFHSUserEnv {
|
|||||||
pkgs.SDL2_mixer
|
pkgs.SDL2_mixer
|
||||||
pkgs.gstreamer
|
pkgs.gstreamer
|
||||||
pkgs.gst_plugins_base
|
pkgs.gst_plugins_base
|
||||||
|
|
||||||
# Not formally in runtime but needed by some games
|
|
||||||
pkgs.gst_all_1.gstreamer
|
|
||||||
pkgs.gst_all_1.gst-plugins-ugly
|
|
||||||
];
|
];
|
||||||
|
|
||||||
extraBuildCommandsMulti = ''
|
extraBuildCommandsMulti = ''
|
||||||
@ -111,8 +115,13 @@ buildFHSUserEnv {
|
|||||||
ln -s libcurl.so.4 libcurl-gnutls.so.4
|
ln -s libcurl.so.4 libcurl-gnutls.so.4
|
||||||
'';
|
'';
|
||||||
|
|
||||||
profile = ''
|
profile = if withRuntime then ''
|
||||||
${if config.steam.enableRuntime or false then "" else "export STEAM_RUNTIME=0"}
|
export STEAM_RUNTIME=0
|
||||||
|
'' else ''
|
||||||
|
# Ugly workaround for https://github.com/ValveSoftware/steam-for-linux/issues/3504
|
||||||
|
export LD_PRELOAD=/lib32/libpulse.so:/lib64/libpulse.so:/lib32/libasound.so:/lib64/libasound.so:$LD_PRELOAD
|
||||||
|
# Another one for https://github.com/ValveSoftware/steam-for-linux/issues/3801
|
||||||
|
export LD_PRELOAD=/lib32/libstdc++.so:/lib64/libstdc++.so:$LD_PRELOAD
|
||||||
'';
|
'';
|
||||||
|
|
||||||
runScript = "steam";
|
runScript = "steam";
|
||||||
|
@ -13781,7 +13781,12 @@ let
|
|||||||
|
|
||||||
steam-original = lowPrio (callPackage ../games/steam { });
|
steam-original = lowPrio (callPackage ../games/steam { });
|
||||||
|
|
||||||
steam = callPackage ../games/steam/chrootenv.nix { };
|
steam = callPackage ../games/steam/chrootenv.nix {
|
||||||
|
# DEPRECATED
|
||||||
|
withJava = config.steam.java or false;
|
||||||
|
withPrimus = config.steam.primus or false;
|
||||||
|
withRuntime = config.steam.withRuntime or true;
|
||||||
|
};
|
||||||
|
|
||||||
stuntrally = callPackage ../games/stuntrally { };
|
stuntrally = callPackage ../games/stuntrally { };
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user