diff -uNr nim-1.6.0/lib/pure/os.nim nim-1.6.0.mod/lib/pure/os.nim
--- nim-1.6.0/lib/pure/os.nim	2021-10-19 01:39:28.000000000 +0100
+++ nim-1.6.0.mod/lib/pure/os.nim	2021-11-30 13:54:12.000000000 +0100
@@ -1008,7 +1008,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: