mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 23:03:40 +01:00
steam: add wrapper testing for libGL
NixOS: Failing to set hardware.opengl.driSupport32Bit will lead to a confusing error message about missing libGL.so.1. We include a wrapper around the steam bin to test for working 32bit opengl with glxinfo. When failing, we display a proper warning hinting towards the option. Fixes: #19518
This commit is contained in:
parent
5fdf1b972a
commit
2fd1b95fad
1 changed files with 12 additions and 1 deletions
|
@ -69,6 +69,9 @@ in buildFHSUserEnv rec {
|
||||||
xlibs.libX11
|
xlibs.libX11
|
||||||
xlibs.libXfixes
|
xlibs.libXfixes
|
||||||
|
|
||||||
|
# Needed to properly check for libGL.so.1 in steam-wrapper.sh
|
||||||
|
pkgsi686Linux.glxinfo
|
||||||
|
|
||||||
# Not formally in runtime but needed by some games
|
# Not formally in runtime but needed by some games
|
||||||
gst_all_1.gstreamer
|
gst_all_1.gstreamer
|
||||||
gst_all_1.gst-plugins-ugly
|
gst_all_1.gst-plugins-ugly
|
||||||
|
@ -103,7 +106,15 @@ in buildFHSUserEnv rec {
|
||||||
export TZDIR=/etc/zoneinfo
|
export TZDIR=/etc/zoneinfo
|
||||||
'';
|
'';
|
||||||
|
|
||||||
runScript = "steam";
|
runScript = writeScript "steam-wrapper.sh" ''
|
||||||
|
#!${stdenv.shell}
|
||||||
|
glxinfo >/dev/null 2>&1
|
||||||
|
if [ ! "$?" = "0" ]; then
|
||||||
|
echo "*** WARNING: Test for 32-bit libGL unsuccessful."
|
||||||
|
echo " This could mean you forgot to activate hardware.opengl.driSupport32Bit"
|
||||||
|
fi
|
||||||
|
steam
|
||||||
|
'';
|
||||||
|
|
||||||
passthru.run = buildFHSUserEnv {
|
passthru.run = buildFHSUserEnv {
|
||||||
name = "steam-run";
|
name = "steam-run";
|
||||||
|
|
Loading…
Reference in a new issue