Open orthoxerox opened 6 years ago
Looks like the following procedure should be patched before nim is built: https://github.com/nim-lang/Nim/blob/c7ba4d91a34882e94969595ba70763f9f642423c/compiler/options.nim#L228
something like this ?
proc setDefaultLibpath*() =
# set default value (can be overwritten):
if libpath == "":
# choose default libpath:
var prefix = getPrefixDir()
when defined(posix):
if prefix == "/usr": libpath = "/usr/lib/nim"
elif prefix == "/usr/local": libpath = "/usr/local/lib/nim"
else: libpath = joinPath(prefix, "lib/nim") -> this change might not be nessesary
else: libpath = joinPath(prefix, "lib/nim") -> this change however might
Ah no breaks building it, forget about that one. Tried a few way's all end up breaking the build so that seems a nogo.
The easiest way would be to get rid of lib/nim and chuck everything into lib during installation, but I suspect that subfolder is there for a reason.
probably to not pollute mingw's lib dir with nim's api files. Does not matter that much but it does look better, so if there is a way to coerce it to accept this then it would be nice.
Simulation steps:
pacman -S mingw32/mingw-w64-i686-nim
echo 'echo("Hello world")' > hello.nim
nim c hello.nim
Expected behavior:
Actual behavior:
system.nim is present, but at
C:\...\msys32\mingw32\lib\nim
PS: I will test it on msys64 later.