From 9a07a8505ea666742b0f3161bcf80846fbf22e13 Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Fri, 15 Jan 2016 14:54:01 +0300 Subject: [PATCH 1/2] steam-runtime-wrapped: add optional override of libstdc++ --- pkgs/games/steam/runtime-wrapped.nix | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pkgs/games/steam/runtime-wrapped.nix b/pkgs/games/steam/runtime-wrapped.nix index 56422deb1db..c1c79f8ac43 100644 --- a/pkgs/games/steam/runtime-wrapped.nix +++ b/pkgs/games/steam/runtime-wrapped.nix @@ -1,9 +1,11 @@ -{ 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; [ @@ -77,19 +79,18 @@ let 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"; From f4d71737a8af1666f13bc25ab999fc7b792f1876 Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Fri, 15 Jan 2016 14:57:17 +0300 Subject: [PATCH 2/2] steam: propagate runtime-wrapped flags for more convenient overrides --- pkgs/games/steam/default.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pkgs/games/steam/default.nix b/pkgs/games/steam/default.nix index 64f8cfe2c28..dd02903dcb2 100644 --- a/pkgs/games/steam/default.nix +++ b/pkgs/games/steam/default.nix @@ -1,11 +1,17 @@ -{ 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 { };