mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-11 20:25:32 +03:00
steam: fix 32bit driver check
- /host/etc/NIXOS only existed in the chroot
- glxinfo does not write a proper error code on errors 🤦
This commit is contained in:
parent
cb36a91818
commit
7f972523f3
1 changed files with 4 additions and 3 deletions
|
@ -271,10 +271,10 @@ in buildFHSEnv rec {
|
||||||
'' + extraProfile;
|
'' + extraProfile;
|
||||||
|
|
||||||
runScript = writeShellScript "steam-wrapper.sh" ''
|
runScript = writeShellScript "steam-wrapper.sh" ''
|
||||||
if [ -f /host/etc/NIXOS ]; then # Check only useful on NixOS
|
if [ -f /etc/NIXOS ]; then # Check only useful on NixOS
|
||||||
${glxinfo-i686}/bin/glxinfo >/dev/null 2>&1
|
${glxinfo-i686}/bin/glxinfo 2>&1 | grep -q Error
|
||||||
# If there was an error running glxinfo, we know something is wrong with the configuration
|
# If there was an error running glxinfo, we know something is wrong with the configuration
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
cat <<EOF > /dev/stderr
|
cat <<EOF > /dev/stderr
|
||||||
**
|
**
|
||||||
WARNING: Steam is not set up. Add the following options to /etc/nixos/configuration.nix
|
WARNING: Steam is not set up. Add the following options to /etc/nixos/configuration.nix
|
||||||
|
@ -303,6 +303,7 @@ in buildFHSEnv rec {
|
||||||
'' + args.extraPreBwrapCmds or "";
|
'' + args.extraPreBwrapCmds or "";
|
||||||
|
|
||||||
extraBwrapArgs = [
|
extraBwrapArgs = [
|
||||||
|
"--bind /etc/NIXOS /etc/NIXOS" # required 32bit driver check in runScript
|
||||||
"--bind-try /tmp/dumps /tmp/dumps"
|
"--bind-try /tmp/dumps /tmp/dumps"
|
||||||
] ++ args.extraBwrapArgs or [];
|
] ++ args.extraBwrapArgs or [];
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue