From 21e9a46e1818e6760680dd2ea72ce2305b1ac65e Mon Sep 17 00:00:00 2001 From: Nathan Flurry Date: Thu, 11 Apr 2024 14:56:35 -0700 Subject: [PATCH] feat(nix): skip building bolt in nix with NIX_SKIP_BOLT --- shell.nix | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/shell.nix b/shell.nix index 16cceb7182..60770df24a 100644 --- a/shell.nix +++ b/shell.nix @@ -5,6 +5,8 @@ let unstablePkgs = import ./infra/nix/common/unstable_pkgs.nix; custom_clickhouse = import ./infra/nix/pkgs/clickhouse.nix { inherit (pkgs) stdenv fetchurl lib; }; + + envSkipBolt = builtins.getEnv "NIX_SKIP_BOLT" == "1"; custom_bolt = import ./infra/nix/bolt/default.nix; useSccache = builtins.getEnv "USE_SCCACHE" == "1"; @@ -34,7 +36,6 @@ in terraform # Tools - custom_bolt cloc curl docker-client # Standardize client CLI since older clients have breaking changes @@ -65,15 +66,18 @@ in # Fixes "cannot change locale" warning glibcLocales - ] ++ extraInputs ++ ( - pkgs.lib.optionals stdenv.isDarwin [ - libiconv # See https://stackoverflow.com/a/69732679 - darwin.apple_sdk.frameworks.Security - darwin.apple_sdk.frameworks.CoreServices - darwin.apple_sdk.frameworks.CoreFoundation - darwin.apple_sdk.frameworks.Foundation - ] - ); + ] + ++ lib.optional (builtins.getEnv "NIX_SKIP_BOLT" != "1") custom_bolt + ++ extraInputs + ++ ( + pkgs.lib.optionals stdenv.isDarwin [ + libiconv # See https://stackoverflow.com/a/69732679 + darwin.apple_sdk.frameworks.Security + darwin.apple_sdk.frameworks.CoreServices + darwin.apple_sdk.frameworks.CoreFoundation + darwin.apple_sdk.frameworks.Foundation + ] + ); shellHook = '' # Setup Git LFS git lfs install --manual > /dev/null