Nimble on Termux(Android) (current devel version) tries to access /data/local/tmp/nimble_19543/.
How can I change the path of the temporary folder? How can I "install" a package (like bigints) without using nimble. Even on a rooted Android device it's hard to make /data/local/tmp accessible for a non-root user because Android uses Selinux. Thanks for a hint, Helmut
You can probably just clone the repo or use it has a submodule and then add it with --path when compiling
But best to use the termux package since it has fixes for this unless you specifically need devel.
If not then you can apply this patch file before building devel https://github.com/termux/termux-packages/blob/master/packages/nim/os.nim.patch
--- lib/std/private/osappdirs.nim.ORIG 2022-11-16 12:20:36.531282384 +0100
+++ lib/std/private/osappdirs.nim 2022-11-16 12:24:09.291282232 +0100
@@ -139,7 +139,7 @@
let buffer = newWideCString(size.int)
if getTempPath(size, buffer) > 0:
result = $buffer
- elif defined(android): result = "/data/local/tmp"
+ elif defined(android): result = "@TERMUX_PREFIX@/tmp"
else:
getTempDirImpl(result)
if result.len == 0:
Sorry, @TERMUX_PREFIX@ doesn't get resolved. Since I don't know how to access the Termux environment variable PREFIX I had to hard-code it as
/data/data/com.termux/files/usr/tmp which probably works on most Android phones/tablets
I don't know how to access the Termux environment variable PREFIX
Maybe like this
getEnv("PREFIX")