fix: bump nph and refactor build process in makefile

Locally-built nph was not in sync with ci (latest), causing linting errors in ci that were not resolving locally.

`make build-nph` has been refactored to use the recommended approach for building nph.

# Conflicts:
#	.gitignore
This commit is contained in:
E M 2026-02-18 15:29:06 +11:00
parent fef46aee35
commit 071b0e02aa
No known key found for this signature in database
4 changed files with 9 additions and 7 deletions

View File

@ -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

View File

@ -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:

View File

@ -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

2
vendor/nph vendored

@ -1 +1 @@
Subproject commit c6e03162dc2820d3088660f644818d7040e95791
Subproject commit 2cacf6cc28116e4046e0b67a13545af5c4e756bd