fix(nix): add missing nix.conf with our binary cache

Because re-building QT that we already have in cache locally is dumb.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2024-08-13 17:57:59 +02:00
parent 8115a7d6da
commit 08d8c9ebf2
No known key found for this signature in database
GPG Key ID: FE65CD384D5BF7B4
2 changed files with 22 additions and 1 deletions

View File

@ -15,6 +15,7 @@ BUILD_SYSTEM_DIR := vendor/nimbus-build-system
.PHONY: \ .PHONY: \
all \ all \
nix-shell \
bottles \ bottles \
check-qt-dir \ check-qt-dir \
check-pkg-target-linux \ check-pkg-target-linux \
@ -64,6 +65,10 @@ else # "variables.mk" was included. Business as usual until the end of this file
all: nim_status_client all: nim_status_client
nix-shell: export NIX_USER_CONF_FILES := $(PWD)/nix/nix.conf
nix-shell:
nix-shell
# must be included after the default target # must be included after the default target
-include $(BUILD_SYSTEM_DIR)/makefiles/targets.mk -include $(BUILD_SYSTEM_DIR)/makefiles/targets.mk
@ -99,7 +104,6 @@ else
RUN_TARGET := run-linux RUN_TARGET := run-linux
endif endif
check-qt-dir: check-qt-dir:
ifeq ($(shell qmake -v 2>/dev/null),) ifeq ($(shell qmake -v 2>/dev/null),)
$(error Cannot find your Qt5 installation. Please make sure to export correct Qt installation binaries path to PATH env) $(error Cannot find your Qt5 installation. Please make sure to export correct Qt installation binaries path to PATH env)

17
nix/nix.conf Normal file
View File

@ -0,0 +1,17 @@
# NOTE: If you are in Asia you might want to add https://nix-cache-cn.status.im/ to substituters.
substituters = https://nix-cache.status.im/ https://cache.nixos.org/
trusted-substituters = https://nix-cache.status.im/ https://cache.nixos.org/
trusted-public-keys = nix-cache.status.im-1:x/93lOfLU+duPplwMSBR+OlY4+mo+dCN7n0mr4oPwgY= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
# Some downloads are multiple GB, default is 5 minutes
stalled-download-timeout = 3600
connect-timeout = 10
max-jobs = auto
# Build packages if fetching from cache fails.
fallback = true
# Helps avoid removing currently used dependencies via garbage collection
keep-derivations = true
keep-outputs = true
# Some builds on MacOS have issue with sandbox so they are disabled with __noChroot.
sandbox = relaxed
# Enable Nix v2 interface.
experimental-features = flakes nix-command