File tree Expand file tree Collapse file tree 3 files changed +12
-11
lines changed
nix/pkgs/status-go/library Expand file tree Collapse file tree 3 files changed +12
-11
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ RUN if [ "$enable_go_cache" = "true" ]; then \
2929 go env -w GOCACHE=/root/.cache/go-build; \
3030 fi
3131RUN --mount=type=cache,target="/root/.cache/go-build" ,id=statusgo-build-$cache_id \
32- make $build_target USE_SYSTEM_NIM=0 BUILD_TAGS="$build_tags" BUILD_FLAGS="$build_flags"
32+ make $build_target USE_SYSTEM_NIM=0 BUILD_FROM_NIX=0 BUILD_TAGS="$build_tags" BUILD_FLAGS="$build_flags"
3333
3434# Copy binaries to the second image
3535FROM debian:bookworm-slim
Original file line number Diff line number Diff line change @@ -235,14 +235,15 @@ $(NIM_SDS_SOURCE_DIR): ##@build Clone nim-sds
235235clone-nim-sds : $(NIM_SDS_SOURCE_DIR )
236236
237237$(LIBSDS ) :
238- @if [ " X$$ BUILD_FROM_NIX" == " X0" ]; then \
239- clone-nim-sds; \
240- echo " Building nim-sds" $(LIBSDS ) ; \
241- cd $(NIM_SDS_SOURCE_DIR ) && $(MAKE ) update && $(MAKE ) libsds USE_SYSTEM_NIM=$(USE_SYSTEM_NIM ) SHELL=/bin/bash; \
242- else \
243- echo " Skipping nim-sds build from Nix..." ; \
244- fi
245-
238+ ifeq ($(BUILD_FROM_NIX ) ,0)
239+ $(MAKE) clone-nim-sds
240+ @echo "Building nim-sds: $(LIBSDS)"
241+ cd $(NIM_SDS_SOURCE_DIR) && \
242+ $(MAKE) update && \
243+ $(MAKE) libsds USE_SYSTEM_NIM=$(USE_SYSTEM_NIM) SHELL=/bin/bash
244+ else
245+ @echo "Skipping nim-sds build from Nix..."
246+ endif
246247build-libsds : $(LIBSDS )
247248
248249build-libsds-android : clone-nim-sds
Original file line number Diff line number Diff line change @@ -39,6 +39,8 @@ in pkgs.buildGoModule {
3939 allowGoReference = true ;
4040
4141 preBuild = ''
42+ export BUILD_FROM_NIX=1
43+
4244 go run cmd/library/*.go > $NIX_BUILD_TOP/main.go
4345 make generate SHELL=$SHELL GO111MODULE=on GO_GENERATE_CMD='go generate'
4446
@@ -58,8 +60,6 @@ in pkgs.buildGoModule {
5860 --replace-warn "/vendor/Nim/bin/nim" "${ pkgs . nim } /bin/nim"
5961 fi
6062
61- export BUILD_FROM_NIX=1
62-
6363 runHook preBuild
6464 go build \
6565 -buildmode='c-archive' \
You can’t perform that action at this time.
0 commit comments