8 , postgresqlSupport ? true
10 , redshiftSupport ? true
12 , liquibase_redshift_extension
17 lib.optional mysqlSupport mysql_jdbc
18 ++ lib.optional postgresqlSupport postgresql_jdbc
19 ++ lib.optionals redshiftSupport [
21 liquibase_redshift_extension
25 stdenv.mkDerivation rec {
30 url = "https://github.com/liquibase/liquibase/releases/download/v${version}/${pname}-${version}.tar.gz";
31 sha256 = "sha256-1InRJzHqikm6Jd7z54TW6JFn3FO0LtStehWNaC+rdw8=";
34 nativeBuildInputs = [ makeWrapper ];
35 buildInputs = [ jre ];
43 for jar in ${dir}/*.jar; do
50 mv ./{lib,licenses,liquibase.jar} $out/
52 mkdir -p $out/share/doc/${pname}-${version}
57 $out/share/doc/${pname}-${version}
60 # there’s a lot of escaping, but I’m not sure how to improve that
61 cat > $out/bin/liquibase <<EOF
63 # taken from the executable script in the source
64 CP="$out/liquibase.jar"
66 ${lib.concatStringsSep "\n" (map (p: addJars "${p}/share/java") extraJars)}
68 ${lib.getBin jre}/bin/java -cp "\$CP" \$JAVA_OPTS \
69 liquibase.integration.commandline.LiquibaseCommandLine \''${1+"\$@"}
71 chmod +x $out/bin/liquibase
75 description = "Version Control for your database";
76 homepage = "https://www.liquibase.org/";
77 changelog = "https://raw.githubusercontent.com/liquibase/liquibase/v${version}/changelog.txt";
78 sourceProvenance = with sourceTypes; [ binaryBytecode ];
79 license = licenses.asl20;
80 maintainers = with maintainers; [ ];
81 platforms = with platforms; unix;