summary refs log tree commit diff
path: root/pkgs/games/steam
diff options
context:
space:
mode:
authorNikolay Amiantov <ab@fmap.me>2016-07-11 18:07:55 +0300
committerNikolay Amiantov <ab@fmap.me>2016-07-11 18:08:13 +0300
commit6a3e2f89fb9f3c206cceef94926806a4a09a16db (patch)
tree317e5ec04ebbc10cbb2f8c30d2a4e39497470587 /pkgs/games/steam
parent532211c68dc2bdab667739ad895a46a3f23491d1 (diff)
downloadnixpkgs-6a3e2f89fb9f3c206cceef94926806a4a09a16db.tar
nixpkgs-6a3e2f89fb9f3c206cceef94926806a4a09a16db.tar.gz
nixpkgs-6a3e2f89fb9f3c206cceef94926806a4a09a16db.tar.bz2
nixpkgs-6a3e2f89fb9f3c206cceef94926806a4a09a16db.tar.lz
nixpkgs-6a3e2f89fb9f3c206cceef94926806a4a09a16db.tar.xz
nixpkgs-6a3e2f89fb9f3c206cceef94926806a4a09a16db.tar.zst
nixpkgs-6a3e2f89fb9f3c206cceef94926806a4a09a16db.zip
steam: fix primus with new libstdc++ and add to steam-run
Diffstat (limited to 'pkgs/games/steam')
-rw-r--r--pkgs/games/steam/chrootenv.nix40
1 files changed, 21 insertions, 19 deletions
diff --git a/pkgs/games/steam/chrootenv.nix b/pkgs/games/steam/chrootenv.nix
index ba163ebc3d2..9a766455055 100644
--- a/pkgs/games/steam/chrootenv.nix
+++ b/pkgs/games/steam/chrootenv.nix
@@ -8,19 +8,26 @@
 }:
 
 let
-  commonTargetPkgs = pkgs: with pkgs; [
-    steamPackages.steam-fonts
-    # Errors in output without those
-    pciutils
-    python2
-    # Games' dependencies
-    xlibs.xrandr
-    which
-    # Needed by gdialog, including in the steam-runtime
-    perl
-    # Open URLs
-    xdg_utils
-  ];
+  commonTargetPkgs = pkgs: with pkgs;
+    let primus2 =
+      if newStdcpp then primus else primus.override {
+        stdenv = overrideInStdenv stdenv [ useOldCXXAbi ];
+        stdenv_i686 = overrideInStdenv pkgsi686Linux.stdenv [ useOldCXXAbi ];
+      };
+    in [
+      steamPackages.steam-fonts
+      # Errors in output without those
+      pciutils
+      python2
+      # Games' dependencies
+      xlibs.xrandr
+      which
+      # Needed by gdialog, including in the steam-runtime
+      perl
+      # Open URLs
+      xdg_utils
+    ] ++ lib.optional withJava jdk
+      ++ lib.optional withPrimus primus2;
 
 in buildFHSUserEnv rec {
   name = "steam";
@@ -29,12 +36,7 @@ in buildFHSUserEnv rec {
     steamPackages.steam
     # License agreement
     gnome3.zenity
-  ] ++ commonTargetPkgs pkgs
-    ++ lib.optional withJava jdk
-    ++ lib.optional withPrimus (primus.override {
-         stdenv = overrideInStdenv stdenv [ useOldCXXAbi ];
-         stdenv_i686 = overrideInStdenv pkgsi686Linux.stdenv [ useOldCXXAbi ];
-       });
+  ] ++ commonTargetPkgs pkgs;
 
   multiPkgs = pkgs: with pkgs; [
     # These are required by steam with proper errors