Page MenuHomePhabricator

D4875.id15829.diff
No OneTemporary

D4875.id15829.diff

diff --git a/nix/dev-shell.nix b/nix/dev-shell.nix
--- a/nix/dev-shell.nix
+++ b/nix/dev-shell.nix
@@ -22,6 +22,7 @@
, libiconv
, libuv
, mariadb
+, mariadb-up
, nodejs-16_x
, olm
, openjdk8
@@ -114,6 +115,16 @@
export ANDROID_SDK_ROOT=''${ANDROID_SDK_ROOT:-$HOME/Library/Android/sdk}
fi
+ ''
+ # Darwin condition can be removed once linux services are supported
+ + lib.optionalString stdenv.isDarwin ''
+ # Start MariaDB development services
+ "${mariadb-up}"/bin/mariadb-up &
+ mariadb_pid=$!
+
+ wait "$mariadb_pid"
+ '' + ''
+
# Provide decent bash prompt
source "${better-prompt}/bin/better-prompt"
diff --git a/nix/mariadb-up-mac.nix b/nix/mariadb-up-mac.nix
--- a/nix/mariadb-up-mac.nix
+++ b/nix/mariadb-up-mac.nix
@@ -126,5 +126,9 @@
echo "View MariaDB Logs: tail -f $MARIADB_DATA_HOME/logs" >&2
echo "Kill MariaDB server: pkill mariadbd" >&2
+
+ # Explicitly exit this script so the parent shell can determine
+ # when it's safe to return control of terminal to user
+ exit 0
'';
}

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 18, 12:21 AM (21 h, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2532409
Default Alt Text
D4875.id15829.diff (1 KB)

Event Timeline