Skip to content

Commit 4c7aa24

Browse files
authored
gamescope: also patch script paths (#383896)
2 parents 3bfd045 + 5e59721 commit 4c7aa24

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

pkgs/by-name/ga/gamescope/package.nix

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ stdenv.mkDerivation (finalAttrs: {
5959
};
6060

6161
patches = [
62-
# Make it look for shaders in the right place
62+
# Make it look for data in the right place
63+
./scripts-path.patch
6364
./shaders-path.patch
6465
# patch relative gamescopereaper path with absolute
6566
./gamescopereaper.patch
@@ -69,8 +70,11 @@ stdenv.mkDerivation (finalAttrs: {
6970
# so `placeholder "out"` ends up pointing to the wrong place
7071
postPatch = ''
7172
substituteInPlace src/reshade_effect_manager.cpp --replace-fail "@out@" "$out"
73+
substituteInPlace src/Script/Script.cpp --replace-fail "@out@" "$out"
74+
7275
# Patching shebangs in the main `libdisplay-info` build
7376
patchShebangs subprojects/libdisplay-info/tool/gen-search-table.py
77+
7478
# Replace gamescopereeaper with absolute path
7579
substituteInPlace src/Utils/Process.cpp --subst-var-by "gamescopereaper" "$out/bin/gamescopereaper"
7680
patchShebangs default_scripts_install.sh
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/src/Script/Script.cpp b/src/Script/Script.cpp
2+
index a104ee9..f7cfc8b 100644
3+
--- a/src/Script/Script.cpp
4+
+++ b/src/Script/Script.cpp
5+
@@ -130,7 +130,7 @@ namespace gamescope
6+
}
7+
else
8+
{
9+
- RunFolder( "/usr/share/gamescope/scripts", true );
10+
+ RunFolder( "@out@/share/gamescope/scripts", true );
11+
RunFolder( "/etc/gamescope/scripts", true );
12+
}
13+

0 commit comments

Comments
 (0)