PKGBUILDs/mingw-w64-nim-git/0003-Check-lib-nim-subdirectory.patch
2017-05-16 16:52:18 +00:00

16 lines
576 B
Diff

diff --git a/compiler/options.nim b/compiler/options.nim
index 6372cdd..1354da0 100644
--- a/compiler/options.nim
+++ b/compiler/options.nim
@@ -229,6 +229,10 @@ proc setDefaultLibpath*() =
else: libpath = joinPath(prefix, "lib")
else: libpath = joinPath(prefix, "lib")
+ if not fileExists(libpath / "system.nim") and
+ fileExists(libpath / "nim" / "system.nim"):
+ libpath = libpath / "nim"
+
# Special rule to support other tools (nimble) which import the compiler
# modules and make use of them.
let realNimPath = findExe("nim")