Merge pull request #100219 from srghma/patch-3

shmig: fix `migrate` command when postgres is enabled
This commit is contained in:
Maximilian Bosch 2020-10-13 16:42:57 +02:00 committed by GitHub
commit bb2bec48ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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 = ''