1 { stdenv, fetchFromGitHub
2 , withMySQL ? true, withPSQL ? false, withSQLite ? false
3 , mariadb, postgresql, sqlite, gawk, gnugrep, findutils, gnused
7 stdenv.mkDerivation rec {
11 src = fetchFromGitHub {
15 sha256 = "15ry1d51d6dlzzzhck2x57wrq48vs4n9pp20bv2sz6nk92fva5l5";
18 makeFlags = [ "PREFIX=$(out)" ];
23 substituteInPlace shmig \
24 --replace "\`which mysql\`" "${lib.optionalString withMySQL "${mariadb.client}/bin/mysql"}" \
25 --replace "\`which psql\`" "${lib.optionalString withPSQL "${postgresql}/bin/psql"}" \
26 --replace "\`which sqlite3\`" "${lib.optionalString withSQLite "${sqlite}/bin/sqlite3"}" \
27 --replace "awk" "${gawk}/bin/awk" \
28 --replace "grep" "${gnugrep}/bin/grep" \
29 --replace "find" "${findutils}/bin/find" \
30 --replace "sed" "${gnused}/bin/sed"
38 description = "Minimalistic database migration tool with MySQL, PostgreSQL and SQLite support";
39 mainProgram = "shmig";
40 homepage = "https://github.com/mbucc/shmig";
41 license = licenses.bsd3;
42 maintainers = with maintainers; [ ];