nim-workspace improvements
- use local NIMBLE_DIR (we should remove the warning at nimble side) - make sure the correct nimble is picked - install nimlangserver
This commit is contained in:
parent
b390f25205
commit
78625d3b97
5
.envrc
5
.envrc
|
@ -3,4 +3,7 @@
|
|||
source ./scripts/rebuild-nim
|
||||
source ./scripts/rebuild-nimble
|
||||
|
||||
export PATH="$(pwd)/bin:~/.cache/nim-workspace/bin/:$(pwd)/${NIM_DIR}/bin:$(pwd)/scripts:${PATH}"
|
||||
export NIMBLE_DIR="$(pwd)/.nimble"
|
||||
export PATH="$(pwd)/bin:$(realpath ~/.cache/nim-workspace/bin/):$NIMBLE_DIR/bin:$(pwd)/${NIM_DIR}/bin:$(pwd)/scripts:${PATH}"
|
||||
|
||||
source ./scripts/rebuild-languageserver
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
if [ ! -f "$NIMBLE_DIR/bin/nimlangserver" ] ; then
|
||||
nimble install -y nimlangserver
|
||||
fi
|
|
@ -11,8 +11,10 @@ if [ ! -f ~/.cache/nim-workspace/bin/nim$EXE_SUFFIX ]; then
|
|||
if uname | grep -qiE "mingw|msys"; then
|
||||
curl https://github.com/dom96/choosenim/releases/download/v0.8.4/choosenim-0.8.4_windows_amd64.exe \
|
||||
--output /tmp/choosenim.exe
|
||||
/tmp/choosenim.exe stable --nimbleDir:~/.cache/nim-workspace
|
||||
/tmp/choosenim.exe "#version-1-6" --nimbleDir:~/.cache/nim-workspace
|
||||
else
|
||||
curl https://raw.githubusercontent.com/yyoncho/choosenim/nimble-dir/scripts/choosenim-unix-init.sh -sSf | NIMBLE_BIN=~/.cache/nim-workspace sh -x
|
||||
chmod a+x ~/.cache/nim-workspace/choosenim
|
||||
~/.cache/nim-workspace/choosenim "#version-1-6" --nimbleDir:~/.cache/nim-workspace
|
||||
fi
|
||||
fi
|
||||
|
|
|
@ -13,6 +13,8 @@ else
|
|||
BUILD_COMMAND="sh compile_nimble.sh"
|
||||
fi
|
||||
|
||||
git submodule update --init
|
||||
|
||||
pushd $NIMBLE_SOURCES
|
||||
NIMBLE_COMMIT=$(git rev-parse HEAD)
|
||||
popd
|
||||
|
@ -21,7 +23,6 @@ NIMBLE_CACHE_DIR=~/.cache/nim/nim-workspace/
|
|||
NIMBLE=$NIMBLE_CACHE_DIR/nimble_$NIMBLE_COMMIT$EXE_SUFFIX
|
||||
|
||||
if [ ! -f $NIMBLE ]; then
|
||||
git submodule update --init
|
||||
mkdir -p $NIMBLE_CACHE_DIR
|
||||
pushd $NIMBLE_SOURCES
|
||||
$BUILD_COMMAND
|
||||
|
|
Loading…
Reference in New Issue