aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches/instead-use-games-path.patch
diff options
context:
space:
mode:
authorDmitry Polyakov <polyakov@liltechdude.xyz>2021-08-04 17:29:12 +0500
committerLeo Prikler <leo.prikler@student.tugraz.at>2021-08-04 15:44:09 +0200
commit2e0ddc74f6641ec1e286f7f81eaf5bf6644eed52 (patch)
tree48517e85cf329daa18a0257549b6f3f87d93dcb4 /gnu/packages/patches/instead-use-games-path.patch
parenta4c456c80c231696a2b020bf8c1977a90e5997d3 (diff)
downloadguix-2e0ddc74f6641ec1e286f7f81eaf5bf6644eed52.tar
guix-2e0ddc74f6641ec1e286f7f81eaf5bf6644eed52.tar.gz
gnu: Add instead.
* gnu/packages/game-development.scm (instead): New variable. * gnu/packages/patches/instead-use-games-path.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it here.
Diffstat (limited to 'gnu/packages/patches/instead-use-games-path.patch')
-rw-r--r--gnu/packages/patches/instead-use-games-path.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/gnu/packages/patches/instead-use-games-path.patch b/gnu/packages/patches/instead-use-games-path.patch
new file mode 100644
index 0000000000..783fd21add
--- /dev/null
+++ b/gnu/packages/patches/instead-use-games-path.patch
@@ -0,0 +1,32 @@
+From 8b350daa847dd8e131d9e6b5b4434ce68a7903d0 Mon Sep 17 00:00:00 2001
+From: Dmitry Polyakov <polyakov@liltechdude.xyz>
+Date: Wed, 4 Aug 2021 15:46:33 +0500
+Subject: [PATCH] Add support for INSTEAD_GAMES_PATH
+
+In some setups, users might prefer to determine on their own the path in
+which games are located. This patch enables them to do so by setting
+the “INSTEAD_GAMES_PATH” environmnent variable.
+---
+ src/main.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/src/main.c b/src/main.c
+index ba0ada1d..b05497b8 100644
+--- a/src/main.c
++++ b/src/main.c
+@@ -394,6 +394,12 @@ int instead_main(int argc, char *argv[])
+ setdir(game_cwd);
+ profile_load(NULL);
+
++ char *gamespath_env = NULL;
++
++ if (gamespath_env = getenv("INSTEAD_GAMES_PATH"), gamespath_env != NULL) {
++ games_sw = strdup(gamespath_env);
++ }
++
+ for (i = 1; i < argc; i++) {
+ if (lua_sw) /* during load profile */
+ break;
+--
+2.32.0
+