Merge pull request #6733 from abbradar/primus-fix

Some fixes for primus and its support in Steam
This commit is contained in:
Nikolay Amiantov 2015-03-09 23:09:13 +03:00
commit 0d5b9c6845
2 changed files with 4 additions and 8 deletions

View File

@ -1,4 +1,4 @@
{ buildFHSUserEnv, config }: { lib, buildFHSUserEnv, config }:
buildFHSUserEnv { buildFHSUserEnv {
name = "steam"; name = "steam";
@ -14,7 +14,8 @@ buildFHSUserEnv {
pkgs.gnome2.zenity pkgs.gnome2.zenity
pkgs.xdg_utils pkgs.xdg_utils
] ]
++ (if config.steam.java or false then [ pkgs.jdk ] else [ ]) ++ lib.optional (config.steam.java or false) pkgs.jdk
++ lib.optional (config.steam.primus or false) pkgs.primus
; ;
multiPkgs = pkgs: multiPkgs = pkgs:

View File

@ -14,12 +14,7 @@ let
ldPath = makeLibraryPath ([primusLib] ++ optional (primusLib_i686 != null) primusLib_i686); ldPath = makeLibraryPath ([primusLib] ++ optional (primusLib_i686 != null) primusLib_i686);
primusrun = writeScript "primusrun" primusrun = writeScript "primusrun"
'' ''
export LD_LIBRARY_PATH=${ldPath}:\$LD_LIBRARY_PATH export LD_LIBRARY_PATH=${ldPath}:$LD_LIBRARY_PATH
# see: https://github.com/amonakov/primus/issues/138
# On my system, as of 3.16.6, the intel driver dies when the pixel buffers try to read from the
# source memory directly. Setting PRIMUS_UPLOAD causes an indirection through textures which
# avoids this issue.
export PRIMUS_UPLOAD=1
exec "$@" exec "$@"
''; '';
in in