Ensure `STATUS_GO_SRC_OVERRIDE` gets passed to the Nix shell's `config`

Signed-off-by: Pedro Pombeiro <pombeirp@users.noreply.github.com>
This commit is contained in:
Pedro Pombeiro 2019-11-15 16:04:36 +01:00
parent 670c07b9b4
commit e38e9f1072
No known key found for this signature in database
GPG Key ID: C4A24185B2AA48A1
2 changed files with 9 additions and 4 deletions

View File

@ -9,7 +9,7 @@
# This allows for drilling down into a specific attribute in Nix expressions. # 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. # - _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. # 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' GREEN='\033[0;32m'
YELLOW='\033[1;33m' 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 nix-shell ${shellArgs[@]} --run "scripts/prepare-for-desktop-platform.sh" || exit
fi 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 # if _NIX_ATTR is specified we shouldn't use shell.nix, the path will be different
entryPoint="shell.nix" entryPoint="shell.nix"
if [ -n "${_NIX_ATTR}" ]; then if [ -n "${_NIX_ATTR}" ]; then

View File

@ -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, pkgs ? nixpkgs-bootstrap.pkgs,
target-os ? "none" }: target-os ? "none" }:
@ -32,7 +33,7 @@ in mkShell {
# none means we shouldn't include project specific deps # none means we shouldn't include project specific deps
buildInputs = if target-os == "none" then buildInputs = if target-os == "none" then
coreInputs coreInputs
else else
with pkgs; [ with pkgs; [
unzip unzip
ncurses ncurses
@ -46,7 +47,7 @@ in mkShell {
inputsFrom = if target-os == "none" then inputsFrom = if target-os == "none" then
[] []
else else
[ project.shell ]; [ project.shell ];
shellHook = project.shell.shellHook; shellHook = project.shell.shellHook;