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
29
30
31
32
33
34
| | The Minimacy distribution is set up for being compiled and used from the
user's home directory. Running Minimacy as a Guix package requires adding
its store path as a search path for the virtual machine. That is done in
two steps: this patch, and a substitution of the actual store path in the
build process.
--- minimacy/src/hw.c 2022-12-05 18:51:13.000000000 +0100
+++ minimacy/src/hw.c 2022-12-09 15:55:47.122793826 +0100
@@ -90,6 +90,13 @@
#if defined ON_UNIX || defined ON_MACOS_CMDLINE || defined ON_RASPBERRY64
void systemExecDir(char* path, int len)
{
+ char* p = "minimacy-in-gnu-store";
+ if (strlen(p) < len - 2)
+ {
+ strcpy(path, p);
+ systemCleanDir(path);
+ return;
+ }
path[0] = 0;
}
#endif
@@ -583,8 +590,9 @@
PRINTF(th, LOG_USER, "1- command line argument: -dir path\n");
PRINTF(th, LOG_USER, "2- environment variable MINIMACY\n");
PRINTF(th, LOG_USER, "3- grand parent of minimacy.exe (windows only)\n");
- PRINTF(th, LOG_USER, "4- ~/minimacy (on Unix) or [user]/Documents/minimacy (on Windows)\n");
- PRINTF(th, LOG_USER, "5- Working directory\n\n");
+ PRINTF(th, LOG_USER, "4- the minimacy package under /gnu/store (Guix only)\n");
+ PRINTF(th, LOG_USER, "5- ~/minimacy (on Unix) or [user]/Documents/minimacy (on Windows)\n");
+ PRINTF(th, LOG_USER, "6- Working directory\n\n");
}
int hwInit(Thread* th, int argc, char** argv, int standalone)
{
|