diff --git a/Makefile b/Makefile index c60c5eb6..80cd5e50 100644 --- a/Makefile +++ b/Makefile @@ -214,9 +214,11 @@ NPH:=$(shell dirname $(NIM_BINARY))/nph build-nph: ifeq ("$(wildcard $(NPH))","") - $(ENV_SCRIPT) nim c vendor/nph/src/nph.nim && \ - mv vendor/nph/src/nph $(shell dirname $(NPH)) - echo "nph utility is available at " $(NPH) + cd vendor/nph && \ + nimble setup -l && \ + nimble build && \ + mv ./nph ../../$(shell dirname $(NPH)) && \ + echo "nph utility is available at " $(NPH) endif GIT_PRE_COMMIT_HOOK := .git/hooks/pre-commit diff --git a/build.nims b/build.nims index 6a9d0529..612c5725 100644 --- a/build.nims +++ b/build.nims @@ -20,7 +20,7 @@ proc buildBinary( # allow something like "nim nimbus --verbosity:0 --hints:off nimbus.nims" var extra_params = params - when compiles(commandLineParams): + when defined(commandLineParams): for param in commandLineParams(): extra_params &= " " & param else: diff --git a/config.nims b/config.nims index e9e3eb0a..4b24ba54 100644 --- a/config.nims +++ b/config.nims @@ -156,7 +156,7 @@ switch("define", "nimOldCaseObjects") # Enable compat mode for Chronos V4 switch("define", "chronosHandleException") -# begin Nimble config (version 1) -when system.fileExists("nimble.paths"): +# begin Nimble config (version 2) +when withDir(thisDir(), system.fileExists("nimble.paths")): include "nimble.paths" # end Nimble config diff --git a/vendor/nph b/vendor/nph index c6e03162..2cacf6cc 160000 --- a/vendor/nph +++ b/vendor/nph @@ -1 +1 @@ -Subproject commit c6e03162dc2820d3088660f644818d7040e95791 +Subproject commit 2cacf6cc28116e4046e0b67a13545af5c4e756bd