-
Notifications
You must be signed in to change notification settings - Fork 24
/
.envrc
44 lines (32 loc) · 1.1 KB
/
.envrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/env bash
if ! has nix_direnv_version || ! nix_direnv_version 2.2.0; then
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.2.0/direnvrc" "sha256-5EwyKnkJNQeXrRkYbwwRBcXbibosCJqyIUuz9Xq+LRc="
fi
strict_env
source_up_if_exists
dotenv_if_exists .env.local
source_env ./scripts/load_certificate.sh
source_env ./scripts/ensure_nix_use_certificate.sh
export NIX_CONFIG="extra-experimental-features = flakes nix-command"
use flake
export DEVBOX_COREPACK_ENABLED=true
eval "$(devbox generate direnv --print-envrc)"
layout node
source_env ./scripts/install_node_modules_when_not_installed.sh
ANDROID_HOME="$HOME/Library/Android/sdk"
if [ -d "$ANDROID_HOME" ]; then
export ANDROID_HOME
PATH_add "$ANDROID_HOME/platform-tools"
PATH_add "$ANDROID_HOME/emulator"
fi
if [ "$(uname)" == "Darwin" ]; then
pushd ./ios/
if [ ! -d ./Pods/ ]; then
bundle install
bundle exec pod install --repo-update
fi
popd
if ./scripts/is_proxy_enabled.sh; then
xcrun simctl keychain booted add-root-cert "$SSL_CERT_FILE" || log_status "no iOS simulator currently booted, don't add certificate"
fi
fi