mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-01-11 02:13:11 +00:00
chore: remove nph and nim-ffi
This commit is contained in:
parent
a381631fe3
commit
c6e57ed1ee
11
.gitmodules
vendored
11
.gitmodules
vendored
@ -13,14 +13,3 @@
|
||||
ignore = untracked
|
||||
branch = master
|
||||
|
||||
[submodule "vendor/nph"]
|
||||
ignore = untracked
|
||||
branch = master
|
||||
path = vendor/nph
|
||||
url = https://github.com/arnetheduck/nph.git
|
||||
|
||||
[submodule "vendor/nim-ffi"]
|
||||
path = vendor/nim-ffi
|
||||
url = https://github.com/logos-messaging/nim-ffi/
|
||||
ignore = untracked
|
||||
branch = master
|
||||
|
||||
25
Makefile
25
Makefile
@ -113,8 +113,7 @@ GIT_VERSION ?= $(shell git describe --abbrev=6 --always --tags)
|
||||
## Compilation parameters. If defined in the CLI the assignments won't be executed
|
||||
NIM_PARAMS := $(NIM_PARAMS) -d:git_version=\"$(GIT_VERSION)\"
|
||||
|
||||
# Add vendor/nim-ffi to path (kept as submodule due to broken .nimble file)
|
||||
NIM_PARAMS := $(NIM_PARAMS) --path:vendor/nim-ffi
|
||||
# nim-ffi is now installed via Nimble as 'ffi' package
|
||||
|
||||
## Heaptracker options
|
||||
HEAPTRACKER ?= 0
|
||||
@ -330,13 +329,27 @@ networkmonitor: | build deps librln
|
||||
# Default location for nph binary shall be next to nim binary to make it available on the path.
|
||||
NPH:=$(shell dirname $(NIM_BINARY))/nph
|
||||
|
||||
# nph is installed via Nimble, find it in nimble bin directory
|
||||
NIMBLE_BIN_DIR := $(shell nimble path 2>/dev/null | head -1 | xargs dirname 2>/dev/null)/../bin
|
||||
NPH_NIMBLE := $(NIMBLE_BIN_DIR)/nph
|
||||
|
||||
build-nph: | build deps
|
||||
ifeq ("$(wildcard $(NPH))","")
|
||||
$(ENV_SCRIPT) nim c --skipParentCfg:on vendor/nph/src/nph.nim && \
|
||||
mv vendor/nph/src/nph $(shell dirname $(NPH))
|
||||
echo "nph utility is available at " $(NPH)
|
||||
@echo -e $(INFO_MSG) "Building nph from nimble package..."
|
||||
nimble build nph -y
|
||||
@if [ -f "$(NPH_NIMBLE)" ]; then \
|
||||
cp "$(NPH_NIMBLE)" "$(NPH)"; \
|
||||
echo "nph utility is available at $(NPH)"; \
|
||||
else \
|
||||
echo "nph binary not found at $(NPH_NIMBLE), trying alternate location..."; \
|
||||
NPH_PKG=$$(ls -d $(NIMBLE_PKGS_DIR)/nph-* 2>/dev/null | head -1); \
|
||||
if [ -n "$$NPH_PKG" ]; then \
|
||||
nim c --skipParentCfg:on -o:$(NPH) $$NPH_PKG/src/nph.nim; \
|
||||
echo "nph utility is available at $(NPH)"; \
|
||||
fi; \
|
||||
fi
|
||||
else
|
||||
echo "nph utility already exists at " $(NPH)
|
||||
@echo "nph utility already exists at $(NPH)"
|
||||
endif
|
||||
|
||||
GIT_PRE_COMMIT_HOOK := .git/hooks/pre-commit
|
||||
|
||||
@ -148,7 +148,7 @@ Refer to [js-waku repo](https://github.com/waku-org/js-waku/tree/master/packages
|
||||
|
||||
## Formatting
|
||||
|
||||
Nim files are expected to be formatted using the [`nph`](https://github.com/arnetheduck/nph) version present in `vendor/nph`.
|
||||
Nim files are expected to be formatted using [`nph`](https://github.com/arnetheduck/nph), which is installed via Nimble.
|
||||
|
||||
You can easily format file with the `make nph/<relative path to nim> file` command.
|
||||
For example:
|
||||
|
||||
@ -41,6 +41,10 @@ requires "results"
|
||||
requires "nimcrypto"
|
||||
requires "db_connector"
|
||||
requires "dnsclient"
|
||||
requires "nph"
|
||||
|
||||
# FFI framework - from logos-messaging fork
|
||||
requires "https://github.com/logos-messaging/nim-ffi.git >= 0.1.0"
|
||||
|
||||
# Packages with native dependencies
|
||||
requires "eth"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user