unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob e08150668188c89374c22ca12e53d65495ded452 758 bytes (raw)
name: gnu/packages/patches/instead-use-games-path.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
 
From eba79afc957b9dc89cfd5c21434bd8ad5e0363bb Mon Sep 17 00:00:00 2001
From: Dmitry Polyakov <liltechdude@gmail.com>
Date: Wed, 3 Feb 2021 14:33:37 -0500
Subject: [PATCH] add support to get game directory location from environent

---
 src/main.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/main.c b/src/main.c
index 9e6e2c3b..860bd3aa 100644
--- a/src/main.c
+++ b/src/main.c
@@ -366,6 +366,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.30.0

debug log:

solving e081506 ...
found e081506 in https://yhetil.org/guix-patches/20210208141120.9184-1-polyakov@liltechdude.xyz/

applying [1/1] https://yhetil.org/guix-patches/20210208141120.9184-1-polyakov@liltechdude.xyz/
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 0000000..e081506

1:21: space before tab in indent.
 	setdir(game_cwd);
1:22: space before tab in indent.
 	profile_load(NULL);
1:30: space before tab in indent.
 	for (i = 1; i < argc; i++) {
1:31: space before tab in indent.
 		if (lua_sw) /* during load profile */
1:32: space before tab in indent.
 			break;
Checking patch gnu/packages/patches/instead-use-games-path.patch...
Applied patch gnu/packages/patches/instead-use-games-path.patch cleanly.
warning: 5 lines add whitespace errors.

index at:
100644 e08150668188c89374c22ca12e53d65495ded452	gnu/packages/patches/instead-use-games-path.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).