shmig: fix `migrate` command when postgres is enabled

gstqt5
Serhii Khoma 2020-10-11 13:02:48 +03:00 committed by GitHub
parent 30608b8036
commit 539c7388a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{ stdenv, fetchFromGitHub
, withMySQL ? true, withPSQL ? false, withSQLite ? false
, mysql, postgresql, sqlite, gawk
, mysql, postgresql, sqlite, gawk, gnugrep, findutils, gnused
, lib
}:
@ -24,7 +24,10 @@ stdenv.mkDerivation rec {
--replace "\`which mysql\`" "${lib.optionalString withMySQL "${mysql.client}/bin/mysql"}" \
--replace "\`which psql\`" "${lib.optionalString withPSQL "${postgresql}/bin/psql"}" \
--replace "\`which sqlite3\`" "${lib.optionalString withSQLite "${sqlite}/bin/sqlite3"}" \
--replace "awk" "${gawk}/bin/awk"
--replace "awk" "${gawk}/bin/awk" \
--replace "grep" "${gnugrep}/bin/grep" \
--replace "find" "${findutils}/bin/find" \
--replace "sed" "${gnused}/bin/sed"
'';
preBuild = ''