Merge pull request #216972 from SuperSandro2000/steam-fhs-full

steam-small: init

authored by K900 and committed by GitHub 0870fc66 bc05763b

+83 -94
+2 -1
pkgs/games/steam/default.nix
··· 5 let 6 steamPackagesFun = self: let 7 inherit (self) callPackage; 8 - in { 9 steamArch = if stdenv.hostPlatform.system == "x86_64-linux" then "amd64" 10 else if stdenv.hostPlatform.system == "i686-linux" then "i386" 11 else throw "Unsupported platform: ${stdenv.hostPlatform.system}"; ··· 21 else null; 22 inherit buildFHSUserEnv; 23 }; 24 steamcmd = callPackage ./steamcmd.nix { }; 25 }; 26 keep = self: { };
··· 5 let 6 steamPackagesFun = self: let 7 inherit (self) callPackage; 8 + in rec { 9 steamArch = if stdenv.hostPlatform.system == "x86_64-linux" then "amd64" 10 else if stdenv.hostPlatform.system == "i686-linux" then "i386" 11 else throw "Unsupported platform: ${stdenv.hostPlatform.system}"; ··· 21 else null; 22 inherit buildFHSUserEnv; 23 }; 24 + steam-fhsenv-small = steam-fhsenv.override { withGameSpecificLibraries = false; }; 25 steamcmd = callPackage ./steamcmd.nix { }; 26 }; 27 keep = self: { };
+80 -93
pkgs/games/steam/fhsenv.nix
··· 1 - { config, lib, writeScript, buildFHSUserEnv, steam, glxinfo-i686 2 , steam-runtime-wrapped, steam-runtime-wrapped-i686 ? null 3 , extraPkgs ? pkgs: [ ] # extra packages to add to targetPkgs 4 , extraLibraries ? pkgs: [ ] # extra packages to add to multiPkgs 5 , extraProfile ? "" # string to append to profile 6 , extraArgs ? "" # arguments to always pass to steam 7 - , runtimeOnly ? false 8 - , runtimeShell 9 - , stdenv 10 - 11 - # DEPRECATED 12 - , withJava ? config.steam.java or false 13 - , withPrimus ? config.steam.primus or false 14 }: 15 16 let 17 - commonTargetPkgs = pkgs: with pkgs; 18 - [ 19 - # Needed for operating system detection until 20 - # https://github.com/ValveSoftware/steam-for-linux/issues/5909 is resolved 21 - lsb-release 22 - # Errors in output without those 23 - pciutils 24 - # Games' dependencies 25 - xorg.xrandr 26 - which 27 - # Needed by gdialog, including in the steam-runtime 28 - perl 29 - # Open URLs 30 - xdg-utils 31 - iana-etc 32 - # Steam Play / Proton 33 - python3 34 - # Steam VR 35 - procps 36 - usbutils 37 38 - # electron based launchers need newer versions of these libraries than what runtime provides 39 - mesa 40 - sqlite 41 - ] ++ lib.optional withJava jdk8 # TODO: upgrade https://github.com/NixOS/nixpkgs/pull/89731 42 - ++ lib.optional withPrimus primus 43 - ++ extraPkgs pkgs; 44 45 ldPath = lib.optionals stdenv.is64bit [ "/lib64" ] 46 ++ [ "/lib32" ] ··· 87 libthai 88 pango 89 90 - # Not formally in runtime but needed by some games 91 - at-spi2-atk 92 - at-spi2-core # CrossCode 93 - gst_all_1.gstreamer 94 - gst_all_1.gst-plugins-ugly 95 - gst_all_1.gst-plugins-base 96 - json-glib # paradox launcher (Stellaris) 97 - libdrm 98 - libxkbcommon # paradox launcher 99 - libvorbis # Dead Cells 100 - libxcrypt # Alien Isolation, XCOM 2, Company of Heroes 2 101 - mono 102 - xorg.xkeyboardconfig 103 - xorg.libpciaccess 104 - xorg.libXScrnSaver # Dead Cells 105 - udev # shadow of the tomb raider 106 - icu # dotnet runtime, e.g. stardew valley 107 - 108 - # screeps dependencies 109 - gtk3 110 - dbus 111 - zlib 112 - atk 113 - cairo 114 - freetype 115 - gdk-pixbuf 116 - fontconfig 117 - 118 - # friends options won't display "Launch Game" without it 119 - lsof 120 - 121 - # called by steam's setup.sh 122 - file 123 - 124 - # Prison Architect 125 - libGLU 126 - libuuid 127 - libbsd 128 - alsa-lib 129 - 130 - # Loop Hero 131 - libidn2 132 - libpsl 133 - nghttp2.lib 134 - openssl_1_1 135 - rtmpdump 136 137 # dependencies for mesa drivers, needed inside pressure-vessel 138 mesa.llvmPackages.llvm.lib ··· 144 xorg.libxshmfence 145 xorg.libXxf86vm 146 libelf 147 - 148 - # pressure-vessel (required for mangohud and possibly more) 149 - elfutils.out 150 - 151 - # Required 152 - glib 153 - gtk2 154 - bzip2 155 156 # Without these it silently fails 157 xorg.libXinerama ··· 171 libusb1 172 dbus-glib 173 ffmpeg 174 - # Only libraries are needed from those two 175 libudev0-shim 176 177 # Verified games requirements 178 xorg.libXt 179 xorg.libXmu 180 libogg ··· 182 SDL 183 SDL2_image 184 glew110 185 libidn 186 tbb 187 188 # Other things from runtime 189 flac 190 freeglut 191 libjpeg ··· 212 librsvg 213 xorg.libXft 214 libvdpau 215 - ] 216 - ++ steamPackages.steam-runtime-wrapped.overridePkgs 217 ++ extraLibraries pkgs; 218 219 extraInstallCommands = '' ··· 266 exec steam ${extraArgs} "$@" 267 ''; 268 269 - inherit (steam) meta; 270 271 # allows for some gui applications to share IPC 272 # this fixes certain issues where they don't render correctly ··· 282 283 targetPkgs = commonTargetPkgs; 284 inherit multiPkgs profile extraInstallCommands; 285 - 286 inherit unshareIpc unsharePid; 287 288 runScript = writeScript "steam-run" ''
··· 1 + { lib, stdenv, writeScript, buildFHSUserEnv, steam, glxinfo-i686, runtimeShell 2 , steam-runtime-wrapped, steam-runtime-wrapped-i686 ? null 3 , extraPkgs ? pkgs: [ ] # extra packages to add to targetPkgs 4 , extraLibraries ? pkgs: [ ] # extra packages to add to multiPkgs 5 , extraProfile ? "" # string to append to profile 6 , extraArgs ? "" # arguments to always pass to steam 7 + , withGameSpecificLibraries ? true # exclude game specific libraries 8 }: 9 10 let 11 + commonTargetPkgs = pkgs: with pkgs; [ 12 + # Needed for operating system detection until 13 + # https://github.com/ValveSoftware/steam-for-linux/issues/5909 is resolved 14 + lsb-release 15 + # Errors in output without those 16 + pciutils 17 + # Games' dependencies 18 + xorg.xrandr 19 + which 20 + # Needed by gdialog, including in the steam-runtime 21 + perl 22 + # Open URLs 23 + xdg-utils 24 + iana-etc 25 + # Steam Play / Proton 26 + python3 27 + # Steam VR 28 + procps 29 + usbutils 30 31 + # electron based launchers need newer versions of these libraries than what runtime provides 32 + mesa 33 + sqlite 34 + ] ++ extraPkgs pkgs; 35 36 ldPath = lib.optionals stdenv.is64bit [ "/lib64" ] 37 ++ [ "/lib32" ] ··· 78 libthai 79 pango 80 81 + lsof # friends options won't display "Launch Game" without it 82 + file # called by steam's setup.sh 83 84 # dependencies for mesa drivers, needed inside pressure-vessel 85 mesa.llvmPackages.llvm.lib ··· 91 xorg.libxshmfence 92 xorg.libXxf86vm 93 libelf 94 + (lib.getLib elfutils) 95 96 # Without these it silently fails 97 xorg.libXinerama ··· 111 libusb1 112 dbus-glib 113 ffmpeg 114 libudev0-shim 115 116 # Verified games requirements 117 + fontconfig 118 + freetype 119 xorg.libXt 120 xorg.libXmu 121 libogg ··· 123 SDL 124 SDL2_image 125 glew110 126 + libdrm 127 libidn 128 tbb 129 + zlib 130 131 # Other things from runtime 132 + glib 133 + gtk2 134 + bzip2 135 flac 136 freeglut 137 libjpeg ··· 158 librsvg 159 xorg.libXft 160 libvdpau 161 + ] ++ lib.optionals withGameSpecificLibraries [ 162 + # Not formally in runtime but needed by some games 163 + at-spi2-atk 164 + at-spi2-core # CrossCode 165 + gst_all_1.gstreamer 166 + gst_all_1.gst-plugins-ugly 167 + gst_all_1.gst-plugins-base 168 + json-glib # paradox launcher (Stellaris) 169 + libdrm 170 + libxkbcommon # paradox launcher 171 + libvorbis # Dead Cells 172 + libxcrypt # Alien Isolation, XCOM 2, Company of Heroes 2 173 + mono 174 + xorg.xkeyboardconfig 175 + xorg.libpciaccess 176 + xorg.libXScrnSaver # Dead Cells 177 + udev # Shadow of the Tomb Raider 178 + icu # dotnet runtime, e.g. Stardew Valley 179 + 180 + # screeps dependencies 181 + gtk3 182 + dbus 183 + zlib 184 + atk 185 + cairo 186 + freetype 187 + gdk-pixbuf 188 + fontconfig 189 + 190 + # Prison Architect 191 + libGLU 192 + libuuid 193 + libbsd 194 + alsa-lib 195 + 196 + # Loop Hero 197 + libidn2 198 + libpsl 199 + nghttp2.lib 200 + openssl_1_1 201 + rtmpdump 202 + ] ++ steamPackages.steam-runtime-wrapped.overridePkgs 203 ++ extraLibraries pkgs; 204 205 extraInstallCommands = '' ··· 252 exec steam ${extraArgs} "$@" 253 ''; 254 255 + meta = steam.meta // lib.optionalAttrs (!withGameSpecificLibraries) { 256 + description = steam.meta.description + " (without game specific libraries)"; 257 + }; 258 259 # allows for some gui applications to share IPC 260 # this fixes certain issues where they don't render correctly ··· 270 271 targetPkgs = commonTargetPkgs; 272 inherit multiPkgs profile extraInstallCommands; 273 inherit unshareIpc unsharePid; 274 275 runScript = writeScript "steam-run" ''
+1
pkgs/top-level/all-packages.nix
··· 35803 }); 35804 35805 steam = steamPackages.steam-fhsenv; 35806 35807 steam-run = steam.run; 35808
··· 35803 }); 35804 35805 steam = steamPackages.steam-fhsenv; 35806 + steam-small = steamPackages.steam-fhsenv-small; 35807 35808 steam-run = steam.run; 35809