Skip to content

Commit

Permalink
chore: nph needs specific nim version
Browse files Browse the repository at this point in the history
  • Loading branch information
fryorcraken committed Sep 9, 2024
1 parent 59f2e62 commit 5d615ce
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -270,11 +270,29 @@ networkmonitor: | build deps librln
############
## Format ##
############
.PHONY: build-nph clean-nph install-nph print-nph-path
.PHONY: set-nim-202 build-nph clean-nph install-nph print-nph-path

set-nim-202:
ifeq ($(NIM_202), "")
ifneq ($(shell nim --version|grep "2\.0\.2" -c), "1")
ifeq ($(detected_OS),Linux)
wget https://nim-lang.org/download/nim-2.0.2-linux_x64.tar.xz -O nim-2.0.2-linux_x64.tar.xz
echo "3f1aaf4e19b2c341afad7b0f29644d6a40aebb71c7c02420489595751b1796ee66b4a3ba7783c504ef5d732b45e9f0d5443576580c3652e820ce3aebee768f93 nim-2.0.2-linux_x64.tar.xz" > nim-2.0.2-linux_x64.tar.xz.sha512
sha512sum -c nim-2.0.2-linux_x64.tar.xz.sha512
tar xavf nim-2.0.2-linux_x64.tar.xz
NIM_202 := "./nim-2.0.2/bin/nim"
else
echo "Please compile nph manually or improve this job"
exit 1
endif
else
NIM_202 := $(shell which nim)
endif
endif

build-nph:
build-nph: set-nim-202
ifeq ("$(wildcard $(NPH))","")
$(ENV_SCRIPT) nim c vendor/nph/src/nph.nim
$(NIM_202) c vendor/nph/src/nph.nim
endif

GIT_PRE_COMMIT_HOOK := .git/hooks/pre-commit
Expand Down

0 comments on commit 5d615ce

Please sign in to comment.