2020-05-12 17:57:01 +02:00
|
|
|
{ pkgs ? import <nixpkgs> { } }:
|
|
|
|
|
|
|
|
with pkgs;
|
|
|
|
|
|
|
|
mkShell {
|
|
|
|
buildInputs = [ php mysql57 ];
|
|
|
|
|
|
|
|
shellHook = ''
|
|
|
|
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 &
|
2020-05-13 00:44:10 +02:00
|
|
|
sleep 1
|
2020-05-12 17:57:01 +02:00
|
|
|
|
|
|
|
mysql --socket="$(pwd)/.mysql/mysql.sock" -u root < $(pwd)/database/db.sql
|
|
|
|
'';
|
|
|
|
}
|