From 7f972523f363485afc6154f7ec195bc532316ce7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sat, 27 Jul 2024 18:19:10 +0200 Subject: [PATCH 1/4] steam: fix 32bit driver check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - /host/etc/NIXOS only existed in the chroot - glxinfo does not write a proper error code on errors 🤦 --- pkgs/games/steam/fhsenv.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkgs/games/steam/fhsenv.nix b/pkgs/games/steam/fhsenv.nix index 8b504b6c55b6..b897582da7a4 100644 --- a/pkgs/games/steam/fhsenv.nix +++ b/pkgs/games/steam/fhsenv.nix @@ -271,10 +271,10 @@ in buildFHSEnv rec { '' + extraProfile; runScript = writeShellScript "steam-wrapper.sh" '' - if [ -f /host/etc/NIXOS ]; then # Check only useful on NixOS - ${glxinfo-i686}/bin/glxinfo >/dev/null 2>&1 + if [ -f /etc/NIXOS ]; then # Check only useful on NixOS + ${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 [ $? -ne 0 ]; then + if [ $? -eq 0 ]; then cat < /dev/stderr ** 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 ""; extraBwrapArgs = [ + "--bind /etc/NIXOS /etc/NIXOS" # required 32bit driver check in runScript "--bind-try /tmp/dumps /tmp/dumps" ] ++ args.extraBwrapArgs or []; From 52cf1248c12866f2f58c03c7aedb3b4c0b1dec8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sat, 27 Jul 2024 18:23:17 +0200 Subject: [PATCH 2/4] git-blame-ignore-revs: add steam formatting commit --- .git-blame-ignore-revs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index fe5ae020247b..48bee84ab456 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -154,6 +154,9 @@ bdfde18037f8d9f9b641a4016c8ada4dc4cbf856 # nixos/ollama: format with nixfmt-rfc-style (#329561) 246d1ee533810ac1946d863bbd9de9b525818d56 +# steam: cleanup (#216972) +ad815aebfbfe1415ff6436521d545029c803c3fb + # nixos/nvidia: apply nixfmt-rfc-style (#313440) fbdcdde04a7caa007e825a8b822c75fab9adb2d6 From ca0c4a606025fb749a4d5e0c5e5d4df2db6503a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sat, 27 Jul 2024 18:39:54 +0200 Subject: [PATCH 3/4] steam: drop game specific libraries now duplicated with steam own --- pkgs/games/steam/fhsenv.nix | 3 --- 1 file changed, 3 deletions(-) diff --git a/pkgs/games/steam/fhsenv.nix b/pkgs/games/steam/fhsenv.nix index b897582da7a4..bca4c04882dd 100644 --- a/pkgs/games/steam/fhsenv.nix +++ b/pkgs/games/steam/fhsenv.nix @@ -206,7 +206,6 @@ in buildFHSEnv rec { gst_all_1.gst-plugins-ugly gst_all_1.gst-plugins-base json-glib # paradox launcher (Stellaris) - libdrm libxkbcommon # paradox launcher libvorbis # Dead Cells libxcrypt # Alien Isolation, XCOM 2, Company of Heroes 2 @@ -223,9 +222,7 @@ in buildFHSEnv rec { zlib atk cairo - freetype gdk-pixbuf - fontconfig # Prison Architect libGLU From dc8cfc565e66c9d95293836fade61dbc6f97497e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sun, 28 Jul 2024 01:02:26 +0200 Subject: [PATCH 4/4] steam: use 32bit compatible ldd --- pkgs/games/steam/fhsenv.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/games/steam/fhsenv.nix b/pkgs/games/steam/fhsenv.nix index bca4c04882dd..f59a38649671 100644 --- a/pkgs/games/steam/fhsenv.nix +++ b/pkgs/games/steam/fhsenv.nix @@ -23,7 +23,7 @@ let # Errors in output without those pciutils # run.sh wants ldconfig - glibc.bin + glibc_multi.bin # Games' dependencies xorg.xrandr which