17 lines
418 B
Nix
17 lines
418 B
Nix
|
{ 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 &
|
||
|
|
||
|
mysql --socket="$(pwd)/.mysql/mysql.sock" -u root < $(pwd)/database/db.sql
|
||
|
'';
|
||
|
}
|