From 06ffc8bc8be9e9e2ac8cc7a90d835b3dbfc09828 Mon Sep 17 00:00:00 2001 From: rickpeters Date: Tue, 13 Oct 2026 18:37:21 +0200 Subject: [PATCH] fix: build the patched gamescope in the user's cache folder, not /tmp (a tmpfs in the installer's chroot) Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_01KkpbsMw4rQyBsxDG6ebHK2 --- lib/gamescope-nvidia.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/gamescope-nvidia.sh b/lib/gamescope-nvidia.sh index 2495523..dca71af 100644 --- a/lib/gamescope-nvidia.sh +++ b/lib/gamescope-nvidia.sh @@ -28,8 +28,9 @@ gsn_install_package() { gsn_package_installed && return 0 info "Building the patched gamescope for NVIDIA (a few minutes)..." sudo pacman -S --needed --noconfirm base-devel git || { err "Installing the build tools failed."; return 1; } - local dir pkg - dir="$(mktemp -d)" || return 1 + local dir pkg cache="${XDG_CACHE_HOME:-$HOME/.cache}/steamify" + # On disk, not /tmp: the installer's chroot has a tmpfs there (RAM), and the build is 1-2 GB. + mkdir -p "$cache" && dir="$(mktemp -d -p "$cache" gamescope-build.XXXXXX)" || return 1 patch_file gamescope-nvidia.PKGBUILD > "$dir/PKGBUILD" && patch_file gamescope-gbm-scanout.patch > "$dir/gamescope-gbm-scanout.patch" || { err "Couldn't write the build files."