For a "real" port, check the Git logs to see what was done for another platform, for example the nintendo switch and learn from that.
For a bit more lightweight port you might be able to compile with \--os:any and -d:useMalloc; in this case Nim will have very few dependencies on your operating system, apart from some basic ANSI C functions like malloc/free/fopen/fwrite.
