Changeset View
Changeset View
Standalone View
Standalone View
nix/mariadb-up-mac.nix
Show All 11 Lines | mariadb-entrypoint = writeShellApplication { | ||||
name = "mariadb-init"; | name = "mariadb-init"; | ||||
text = '' | text = '' | ||||
MARIADB_DIR=''${XDG_DATA_HOME:-$HOME/.local/share}/MariaDB | MARIADB_DIR=''${XDG_DATA_HOME:-$HOME/.local/share}/MariaDB | ||||
# 'exec' allows for us to replace bash process with MariaDB | # 'exec' allows for us to replace bash process with MariaDB | ||||
echo "View MariaDB logs: tail -f $MARIADB_DIR/logs" >&2 | echo "View MariaDB logs: tail -f $MARIADB_DIR/logs" >&2 | ||||
echo "Kill MariaDB server: pkill mariadbd" >&2 | echo "Kill MariaDB server: pkill mariadbd" >&2 | ||||
# Explicitly close fd3 to prevent `direnv` from hanging | |||||
# (https://linear.app/comm/issue/ENG-3254/remove-wait-logic-in-nix-develop) | |||||
exec 3>&- | |||||
exec "${mariadb}/bin/mariadbd" \ | exec "${mariadb}/bin/mariadbd" \ | ||||
--socket "$MARIADB_DIR"/mysql.sock \ | --socket "$MARIADB_DIR"/mysql.sock \ | ||||
--datadir "$MARIADB_DIR" \ | --datadir "$MARIADB_DIR" \ | ||||
&> "$MARIADB_DIR"/logs | &> "$MARIADB_DIR"/logs | ||||
''; | ''; | ||||
}; | }; | ||||
mariadb-version = let | mariadb-version = let | ||||
▲ Show 20 Lines • Show All 95 Lines • Show Last 20 Lines |