Merge pull request #150966 from sir4ur0n/sir4ur0n/addLiquibaseRedshiftSupport
liquibase: add support for Amazon Redshift
This commit is contained in:
commit
dc421ee748
4 changed files with 80 additions and 6 deletions
|
@ -0,0 +1,27 @@
|
||||||
|
{ lib, stdenv, fetchMavenArtifact }:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "liquibase-redshift-extension";
|
||||||
|
version = "4.8.0";
|
||||||
|
|
||||||
|
src = fetchMavenArtifact {
|
||||||
|
artifactId = "liquibase-redshift";
|
||||||
|
groupId = "org.liquibase.ext";
|
||||||
|
sha256 = "sha256-jZdDKAC4Cvmkih8VH84Z3Q8BzsqGO55Uefr8vOlbDAk=";
|
||||||
|
inherit version;
|
||||||
|
};
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
install -m444 -D $src/share/java/liquibase-redshift-${version}.jar $out/share/java/liquibase-redshift.jar
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
homepage = "https://github.com/liquibase/liquibase-redshift/";
|
||||||
|
description = "Amazon Redshift extension for Liquibase";
|
||||||
|
license = licenses.asl20;
|
||||||
|
platforms = platforms.unix;
|
||||||
|
maintainers = with maintainers; [ sir4ur0n ];
|
||||||
|
};
|
||||||
|
}
|
28
pkgs/development/java-modules/redshift_jdbc/default.nix
Normal file
28
pkgs/development/java-modules/redshift_jdbc/default.nix
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
{ lib, stdenv, fetchMavenArtifact }:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "redshift-jdbc";
|
||||||
|
version = "2.1.0.3";
|
||||||
|
|
||||||
|
src = fetchMavenArtifact {
|
||||||
|
artifactId = "redshift-jdbc42";
|
||||||
|
groupId = "com.amazon.redshift";
|
||||||
|
sha256 = "sha256-TO/JXh/pZ7tUZGfHqkzgZx18gLnISvnPVyGavzFv6vo=";
|
||||||
|
inherit version;
|
||||||
|
};
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
install -m444 -D $src/share/java/redshift-jdbc42-${version}.jar $out/share/java/redshift-jdbc42.jar
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
homepage = "https://github.com/aws/amazon-redshift-jdbc-driver/";
|
||||||
|
description =
|
||||||
|
"JDBC 4.2 driver for Amazon Redshift allowing Java programs to connect to a Redshift database";
|
||||||
|
license = licenses.asl20;
|
||||||
|
platforms = platforms.unix;
|
||||||
|
maintainers = with maintainers; [ sir4ur0n ];
|
||||||
|
};
|
||||||
|
}
|
|
@ -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";
|
||||||
|
|
|
@ -22309,6 +22309,10 @@ with pkgs;
|
||||||
|
|
||||||
postgresqlTestHook = callPackage ../build-support/setup-hooks/postgresql-test-hook { };
|
postgresqlTestHook = callPackage ../build-support/setup-hooks/postgresql-test-hook { };
|
||||||
|
|
||||||
|
redshift_jdbc = callPackage ../development/java-modules/redshift_jdbc { };
|
||||||
|
|
||||||
|
liquibase_redshift_extension = callPackage ../development/java-modules/liquibase_redshift_extension { };
|
||||||
|
|
||||||
prom2json = callPackage ../servers/monitoring/prometheus/prom2json.nix { };
|
prom2json = callPackage ../servers/monitoring/prometheus/prom2json.nix { };
|
||||||
prometheus = callPackage ../servers/monitoring/prometheus { buildGoModule = buildGo118Module; };
|
prometheus = callPackage ../servers/monitoring/prometheus { buildGoModule = buildGo118Module; };
|
||||||
prometheus-alertmanager = callPackage ../servers/monitoring/prometheus/alertmanager.nix { };
|
prometheus-alertmanager = callPackage ../servers/monitoring/prometheus/alertmanager.nix { };
|
||||||
|
|
Loading…
Reference in a new issue