Merge pull request #12404 from abbradar/steam-newlibcpp

Add options to use new libstdc++ on Steam

Changed files
+14 -7
pkgs
+8 -2
pkgs/games/steam/default.nix
···
-
{ pkgs, newScope }:
+
{ pkgs, newScope
+
, nativeOnly ? false
+
, runtimeOnly ? false
+
, newStdcpp ? false
+
}:
let
callPackage = newScope self;
self = rec {
steam-runtime = callPackage ./runtime.nix { };
-
steam-runtime-wrapped = callPackage ./runtime-wrapped.nix { };
+
steam-runtime-wrapped = callPackage ./runtime-wrapped.nix {
+
inherit nativeOnly runtimeOnly newStdcpp;
+
};
steam = callPackage ./steam.nix { };
steam-chrootenv = callPackage ./chrootenv.nix { };
steam-fonts = callPackage ./fonts.nix { };
+6 -5
pkgs/games/steam/runtime-wrapped.nix
···
-
{ stdenv, perl, pkgs, steam-runtime
+
{ stdenv, lib, perl, pkgs, steam-runtime
, nativeOnly ? false
, runtimeOnly ? false
+
, newStdcpp ? false
}:
assert !(nativeOnly && runtimeOnly);
+
assert newStdcpp -> !runtimeOnly;
let
runtimePkgs = with pkgs; [
···
SDL2_mixer
gstreamer
gst_plugins_base
-
];
+
] ++ lib.optional (!newStdcpp) gcc48.cc;
overridePkgs = with pkgs; [
-
gcc48.cc # libstdc++
libpulseaudio
alsaLib
openalSoft
-
];
+
] ++ lib.optional newStdcpp gcc.cc;
ourRuntime = if runtimeOnly then []
else if nativeOnly then runtimePkgs ++ overridePkgs
else overridePkgs;
-
steamRuntime = stdenv.lib.optional (!nativeOnly) steam-runtime;
+
steamRuntime = lib.optional (!nativeOnly) steam-runtime;
in stdenv.mkDerivation rec {
name = "steam-runtime-wrapped";