Just removed termux and reinstalled from scratch ( I can only test on my phone,
android 7 ), here are my steps:
apt install git
apt install clang
git clone https://github.com/nim-lang/Nim
cd Nim && git clone https://github.com/nim-lang/csources
apt install libandroid-glob && apt install libandroid-glob-dev
In `csources/build.sh`` line 32: ``LINK_FLAGS="-landroid-glob ${LDFLAGS:-} "`
In whatever `c#_#` ( mine was `c2_2` ) folder it's building, `stdlib_osproc.c`
`"bin/sh"` -> `"sh"` (line 400)
now in `csources`, `sh ./build.sh` should work.
We have nim!
In `config/nim.cfg` add `passL=" -landroid-glob "` and `define:termux`
In `lib/posix/posix.nim` : line 283: `when defined(macosx) or defined(termux):`
and on line 1623: `when not defined(macosx) and not defined(termux)` ( you just
need to add the termux part )
In `lib/pure/osproc.nim` `"bin/sh"` -> `"sh"` (line 744 in nim)
Now `./bin/nim c Koch` should work
./koch boot
./koch tools
Hope this helps. ( I'll update my post if this works for you too )