From de59767f43b483357c5484d9ec4768aa616376b5 Mon Sep 17 00:00:00 2001 From: Yuriy Glukhov Date: Sat, 10 Dec 2016 11:39:32 +0200 Subject: [PATCH] Fixed installation from git dir --- nimble.nimble | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nimble.nimble b/nimble.nimble index cf6b4d4..78e6ba8 100644 --- a/nimble.nimble +++ b/nimble.nimble @@ -1,4 +1,7 @@ -when fileExists("src/nimblepkg/common.nim"): +import ospaths +template thisModuleFile: string = instantiationInfo(fullPaths = true).filename + +when fileExists(thisModuleFile.parentDir / "src/nimblepkg/common.nim"): # In the git repository the Nimble sources are in a ``src`` directory. import src/nimblepkg/common else: