mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-02-26 00:33:23 +00:00
nix: use system nim for building nph.nim
Signed-off-by: markoburcul <marko@status.im>
This commit is contained in:
parent
404ec393b5
commit
c04d74468f
@ -49,6 +49,7 @@ in stdenv.mkDerivation rec {
|
||||
which
|
||||
lsb-release
|
||||
zerokitPkg
|
||||
nim-unwrapped-2_0
|
||||
fakeGit
|
||||
fakeCargo
|
||||
fakeRustup
|
||||
@ -73,19 +74,10 @@ in stdenv.mkDerivation rec {
|
||||
preBuild = ''
|
||||
ln -s waku.nimble waku.nims
|
||||
|
||||
# Step 2: Clean and rebuild waku.nims
|
||||
rm -rf waku.nims || true
|
||||
make waku.nims
|
||||
mkdir -p ./vendor/nimbus-build-system/vendor/Nim/bin/nim
|
||||
USE_SYSTEM_NIM=1 ./vendor/nimbus-build-system/scripts/env.sh nim c vendor/nph/src/nph.nim
|
||||
mv vendor/nph/src/nph ./vendor/nimbus-build-system/vendor/Nim/bin/nim
|
||||
|
||||
# Step 3: Build nph utility if it doesn't exist
|
||||
NPH_PATH=$(dirname $(readlink -f vendor/nph/src/nph))
|
||||
if [ ! -f "${NPH_PATH}/nph" ]; then
|
||||
${pkgs.envScript} nim c vendor/nph/src/nph.nim
|
||||
mv vendor/nph/src/nph "${NPH_PATH}/nph"
|
||||
echo "nph utility is available at ${NPH_PATH}/nph"
|
||||
else
|
||||
echo "nph utility already exists at ${NPH_PATH}/nph"
|
||||
fi
|
||||
pushd vendor/nimbus-build-system/vendor/Nim
|
||||
mkdir dist
|
||||
cp -r ${callPackage ./nimble.nix {}} dist/nimble
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user