liquibase: add support for Amazon Redshift
The Liquibase package already provided PostgreSQL and MySQL support, this commit also adds support for Amazon Redshift. As per Liquibase Redshift documentation, 2 JARs must be added to the classpath: * Redshift JDBC * Liquibase Redshift extension JAR
This commit is contained in:
parent
a7c93695a5
commit
3ffe1ccca0
1 changed files with 21 additions and 6 deletions
|
@ -1,11 +1,25 @@
|
||||||
{ lib, stdenv, fetchurl, jre, makeWrapper
|
{ lib
|
||||||
, mysqlSupport ? true, mysql_jdbc
|
, stdenv
|
||||||
, postgresqlSupport ? true, postgresql_jdbc }:
|
, fetchurl
|
||||||
|
, jre
|
||||||
|
, makeWrapper
|
||||||
|
, mysqlSupport ? true
|
||||||
|
, mysql_jdbc
|
||||||
|
, postgresqlSupport ? true
|
||||||
|
, postgresql_jdbc
|
||||||
|
, redshiftSupport ? true
|
||||||
|
, redshift_jdbc
|
||||||
|
, liquibase_redshift_extension
|
||||||
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
extraJars =
|
extraJars =
|
||||||
lib.optional mysqlSupport mysql_jdbc
|
lib.optional mysqlSupport mysql_jdbc
|
||||||
++ lib.optional postgresqlSupport postgresql_jdbc;
|
++ lib.optional postgresqlSupport postgresql_jdbc
|
||||||
|
++ lib.optionals redshiftSupport [
|
||||||
|
redshift_jdbc
|
||||||
|
liquibase_redshift_extension
|
||||||
|
];
|
||||||
in
|
in
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
|
@ -30,7 +44,8 @@ stdenv.mkDerivation rec {
|
||||||
CP="\$CP":"\$jar"
|
CP="\$CP":"\$jar"
|
||||||
done
|
done
|
||||||
'';
|
'';
|
||||||
in ''
|
in
|
||||||
|
''
|
||||||
mkdir -p $out
|
mkdir -p $out
|
||||||
mv ./{lib,licenses,liquibase.jar} $out/
|
mv ./{lib,licenses,liquibase.jar} $out/
|
||||||
|
|
||||||
|
@ -54,7 +69,7 @@ stdenv.mkDerivation rec {
|
||||||
liquibase.integration.commandline.Main \''${1+"\$@"}
|
liquibase.integration.commandline.Main \''${1+"\$@"}
|
||||||
EOF
|
EOF
|
||||||
chmod +x $out/bin/liquibase
|
chmod +x $out/bin/liquibase
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Version Control for your database";
|
description = "Version Control for your database";
|
||||||
|
|
Loading…
Reference in a new issue