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