diff --git a/nix/shell.sh b/nix/shell.sh index 02a5d8d660..b3895338cc 100755 --- a/nix/shell.sh +++ b/nix/shell.sh @@ -9,7 +9,7 @@ # This allows for drilling down into a specific attribute in Nix expressions. # - _NIX_PURE: This variable allows for making the shell pure with the use of --pure. # Take note that this makes Nix tools like `nix-build` unavailable in the shell. -# - _NIX_KEEP: This variable allows specifying which env vars to keep for Nix pure shell. +# - _NIX_KEEP: This variable allows specifying which env vars to keep for Nix pure shell. GREEN='\033[0;32m' YELLOW='\033[1;33m' @@ -51,6 +51,10 @@ if [[ "$TARGET_OS" =~ (linux|windows|darwin|macos) ]]; then nix-shell ${shellArgs[@]} --run "scripts/prepare-for-desktop-platform.sh" || exit fi +if [ -n "${STATUS_GO_SRC_OVERRIDE}" ]; then + shellArgs+=("--arg config {android_sdk.accept_license=true;status_go.src_override=\"${STATUS_GO_SRC_OVERRIDE}\";}") +fi + # if _NIX_ATTR is specified we shouldn't use shell.nix, the path will be different entryPoint="shell.nix" if [ -n "${_NIX_ATTR}" ]; then diff --git a/shell.nix b/shell.nix index 64ab4f74c2..7babbdb4d4 100644 --- a/shell.nix +++ b/shell.nix @@ -1,4 +1,5 @@ -{ nixpkgs-bootstrap ? import ./nix/nixpkgs-bootstrap.nix { }, +{ config ? { android_sdk.accept_license = true; }, + nixpkgs-bootstrap ? import ./nix/nixpkgs-bootstrap.nix { inherit config; }, pkgs ? nixpkgs-bootstrap.pkgs, target-os ? "none" }: @@ -32,7 +33,7 @@ in mkShell { # none means we shouldn't include project specific deps buildInputs = if target-os == "none" then coreInputs - else + else with pkgs; [ unzip ncurses @@ -46,7 +47,7 @@ in mkShell { inputsFrom = if target-os == "none" then [] - else + else [ project.shell ]; shellHook = project.shell.shellHook;