Merge pull request #12404 from abbradar/steam-newlibcpp

Add options to use new libstdc++ on Steam

+14 -7
+8 -2
pkgs/games/steam/default.nix
··· 1 - { pkgs, newScope }: 1 + { pkgs, newScope 2 + , nativeOnly ? false 3 + , runtimeOnly ? false 4 + , newStdcpp ? false 5 + }: 2 6 3 7 let 4 8 callPackage = newScope self; 5 9 6 10 self = rec { 7 11 steam-runtime = callPackage ./runtime.nix { }; 8 - steam-runtime-wrapped = callPackage ./runtime-wrapped.nix { }; 12 + steam-runtime-wrapped = callPackage ./runtime-wrapped.nix { 13 + inherit nativeOnly runtimeOnly newStdcpp; 14 + }; 9 15 steam = callPackage ./steam.nix { }; 10 16 steam-chrootenv = callPackage ./chrootenv.nix { }; 11 17 steam-fonts = callPackage ./fonts.nix { };
+6 -5
pkgs/games/steam/runtime-wrapped.nix
··· 1 - { stdenv, perl, pkgs, steam-runtime 1 + { stdenv, lib, perl, pkgs, steam-runtime 2 2 , nativeOnly ? false 3 3 , runtimeOnly ? false 4 + , newStdcpp ? false 4 5 }: 5 6 6 7 assert !(nativeOnly && runtimeOnly); 8 + assert newStdcpp -> !runtimeOnly; 7 9 8 10 let 9 11 runtimePkgs = with pkgs; [ ··· 77 79 SDL2_mixer 78 80 gstreamer 79 81 gst_plugins_base 80 - ]; 82 + ] ++ lib.optional (!newStdcpp) gcc48.cc; 81 83 82 84 overridePkgs = with pkgs; [ 83 - gcc48.cc # libstdc++ 84 85 libpulseaudio 85 86 alsaLib 86 87 openalSoft 87 - ]; 88 + ] ++ lib.optional newStdcpp gcc.cc; 88 89 89 90 ourRuntime = if runtimeOnly then [] 90 91 else if nativeOnly then runtimePkgs ++ overridePkgs 91 92 else overridePkgs; 92 - steamRuntime = stdenv.lib.optional (!nativeOnly) steam-runtime; 93 + steamRuntime = lib.optional (!nativeOnly) steam-runtime; 93 94 94 95 in stdenv.mkDerivation rec { 95 96 name = "steam-runtime-wrapped";