From 08d8c9ebf270d2b7fe65471c54dcfc001d2e9959 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Tue, 13 Aug 2024 17:57:59 +0200 Subject: [PATCH] fix(nix): add missing nix.conf with our binary cache MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Because re-building QT that we already have in cache locally is dumb. Signed-off-by: Jakub SokoĊ‚owski --- Makefile | 6 +++++- nix/nix.conf | 17 +++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 nix/nix.conf diff --git a/Makefile b/Makefile index d4b7b2b0bc..6f4fbcf94b 100644 --- a/Makefile +++ b/Makefile @@ -15,6 +15,7 @@ BUILD_SYSTEM_DIR := vendor/nimbus-build-system .PHONY: \ all \ + nix-shell \ bottles \ check-qt-dir \ 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 +nix-shell: export NIX_USER_CONF_FILES := $(PWD)/nix/nix.conf +nix-shell: + nix-shell + # must be included after the default target -include $(BUILD_SYSTEM_DIR)/makefiles/targets.mk @@ -99,7 +104,6 @@ else RUN_TARGET := run-linux endif - check-qt-dir: 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) diff --git a/nix/nix.conf b/nix/nix.conf new file mode 100644 index 0000000000..fe02e7dffe --- /dev/null +++ b/nix/nix.conf @@ -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