steam: remove nativeOnly options
This commit is contained in:
parent
671a068a01
commit
fae860361e
@ -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;
|
||||
]
|
||||
++ 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 ''
|
||||
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" "$@"
|
||||
'';
|
||||
|
@ -31445,9 +31445,6 @@ with pkgs;
|
||||
steam = steamPackages.steam-fhsenv;
|
||||
|
||||
steam-run = steam.run;
|
||||
steam-run-native = (steam.override {
|
||||
nativeOnly = true;
|
||||
}).run;
|
||||
|
||||
steam-tui = callPackage ../games/steam-tui { };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user