From 179f1d26aeda9a52e4f42fa7ebe8b3441f582d6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Mon, 15 Nov 2021 12:11:23 +0100 Subject: [PATCH] nix: remove obsolete references to Nimbus sources MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This used to be a project to integrate Nimbus with mobile, but it was abandoned. Signed-off-by: Jakub SokoĊ‚owski --- Makefile | 2 +- nix/config.nix | 1 - nix/scripts/shell.sh | 3 -- nix/status-go/nimbus/default.nix | 47 -------------------------------- nix/status-go/source.nix | 6 ++-- scripts/release-android.sh | 3 -- 6 files changed, 4 insertions(+), 58 deletions(-) delete mode 100644 nix/status-go/nimbus/default.nix diff --git a/Makefile b/Makefile index 950b1a6025..d3bb865f4d 100644 --- a/Makefile +++ b/Makefile @@ -42,7 +42,7 @@ export NIX_CONF_DIR = $(PWD)/nix # Location of symlinks to derivations that should not be garbage collected export _NIX_GCROOTS = /nix/var/nix/gcroots/per-user/$(USER)/status-react # Defines which variables will be kept for Nix pure shell, use semicolon as divider -export _NIX_KEEP ?= TMPDIR,BUILD_ENV,STATUS_GO_SRC_OVERRIDE,NIMBUS_SRC_OVERRIDE +export _NIX_KEEP ?= TMPDIR,BUILD_ENV,STATUS_GO_SRC_OVERRIDE # Useful for Andoird release builds TMP_BUILD_NUMBER := $(shell ./scripts/version/gen_build_no.sh | cut -c1-10) diff --git a/nix/config.nix b/nix/config.nix index b8b34c232a..416ff6e5ae 100644 --- a/nix/config.nix +++ b/nix/config.nix @@ -13,7 +13,6 @@ abi-include = "armeabi-v7a;arm64-v8a;x86"; # Android architectures to build for }; - nimbus = { src-override = null; }; status-go = { src-override = null; }; }; diff --git a/nix/scripts/shell.sh b/nix/scripts/shell.sh index cdd95da843..bee2b72ff8 100755 --- a/nix/scripts/shell.sh +++ b/nix/scripts/shell.sh @@ -46,9 +46,6 @@ config='' if [[ -n "${STATUS_GO_SRC_OVERRIDE}" ]]; then config+="status-im.status-go.src-override=\"${STATUS_GO_SRC_OVERRIDE}\";" fi -if [[ -n "${NIMBUS_SRC_OVERRIDE}" ]]; then - config+="status-im.nimbus.src-override=\"${NIMBUS_SRC_OVERRIDE}\";" -fi config+="status-im.build-type=\"${BUILD_TYPE}\";" if [[ -n "$config" ]]; then diff --git a/nix/status-go/nimbus/default.nix b/nix/status-go/nimbus/default.nix deleted file mode 100644 index 99615aeb7f..0000000000 --- a/nix/status-go/nimbus/default.nix +++ /dev/null @@ -1,47 +0,0 @@ -# -# This fetches nimbus source from local folder or GitHub and -# loads the derivation defined in the `nix/default.nix` in the repo. -# - -{ config, lib, stdenv, callPackage, fetchFromGitHub }: - -let - inherit (lib) getConfig attrByPath strings traceValFn; - - repo = "nimbus"; - - localPath = getConfig "nimbus.src-override" ""; - localSrc = - # We use builtins.path so that we can name the resulting derivation. - # Name would be taken from the checkout directory, and wouldn't be deterministic. - builtins.path rec { - path = traceValFn (path: '' - Using local ${repo} sources from ${path} - '') localPath; - name = "${repo}-source-local"; - filter = - # Keep this filter as restrictive as possible in order to - # avoid unnecessary rebuilds and limit closure size - lib.mkFilter { - root = path; - include = [ - "nix.*" "wrappers.*" "vendor.*" - "Makefile" "nim.cfg" "nimbus.nimble" "default.nix" - ]; - }; - }; - - ghSrc = fetchFromGitHub rec { - inherit repo; - name = "${repo}-source-${strings.substring 0 7 rev}"; - rev = "73278f20d0bf27fb7c6c331b515abb765814f1cc"; - owner = "status-im"; - sha256 = "0myq234zqnpmqsc2452xygnyc6sjs8x1blyrpa4bi9v2cwbyap5c"; - fetchSubmodules = true; - }; - - src = if localPath != "" then localSrc else ghSrc; - - nimbusDeriv = import "${src}/nix/default.nix"; - -in nimbusDeriv diff --git a/nix/status-go/source.nix b/nix/status-go/source.nix index 63052563aa..ca33f8a0e0 100644 --- a/nix/status-go/source.nix +++ b/nix/status-go/source.nix @@ -1,9 +1,9 @@ { config, utils, lib, callPackage, fetchFromGitHub }: let - inherit (lib) strings traceValFn attrByPath importJSON; + inherit (lib) strings traceValFn attrByPath importJSON getConfig; - srcOverride = attrByPath [ "status-im" "status-go" "src-override" ] null config; + srcOverride = getConfig "status-go.src-override" null; # Warning message about using local sources localSrcWarn = (path: "Using local status-go sources from ${path}"); @@ -27,7 +27,7 @@ let include = [ ".*" ]; exclude = [ ".*/[.]git.*" ".*[.]md" ".*[.]yml" ".*/.*_test.go$" - "_assets/.*" "build/.*" + "VERSION" "_assets/.*" "build/.*" ".*/.*LICENSE.*" ".*/CONTRIB.*" ".*/AUTHOR.*" ]; }; diff --git a/scripts/release-android.sh b/scripts/release-android.sh index 4ba611b8dd..7c811896be 100755 --- a/scripts/release-android.sh +++ b/scripts/release-android.sh @@ -26,9 +26,6 @@ config='' if [[ -n "${STATUS_GO_SRC_OVERRIDE}" ]]; then config+="status-im.status-go.src-override=\"${STATUS_GO_SRC_OVERRIDE}\";" fi -if [[ -n "${NIMBUS_SRC_OVERRIDE}" ]]; then - config+="status-im.nimbus.src-override=\"${NIMBUS_SRC_OVERRIDE}\";" -fi if [[ "${ANDROID_APK_SIGNED}" == "true" ]]; then config+="status-im.android.keystore-path=\"$(must_get_env KEYSTORE_PATH)\";" fi