Add MySql environment
This commit is contained in:
parent
02e292720f
commit
5198dc5016
|
@ -0,0 +1,21 @@
|
|||
{ pkgs ? import <nixpkgs> { } }:
|
||||
|
||||
with pkgs;
|
||||
|
||||
mkShell {
|
||||
buildInputs = [ mysql57 ];
|
||||
|
||||
shellHook = ''
|
||||
pkill mysql
|
||||
rm -rf .mysql && mkdir .mysql
|
||||
|
||||
mysqld --datadir="$(pwd)/.mysql" --socket="$(pwd)/.mysql/mysql.sock" --initialize-insecure
|
||||
mysqld --datadir="$(pwd)/.mysql" --socket="$(pwd)/.mysql/mysql.sock" --skip-networking &
|
||||
sleep 1
|
||||
|
||||
mysql --socket="$(pwd)/.mysql/mysql.sock" -u root < $(pwd)/assets/db.sql
|
||||
|
||||
alias phpunit="./vendor/bin/phpunit"
|
||||
alias mysql='mysql --socket="$(pwd)/.mysql/mysql.sock" -u root'
|
||||
'';
|
||||
}
|
Loading…
Reference in New Issue