@@ -1,11 +1,11 @@
1−{ stdenv, fetchurl, jre, makeWrapper
2−, mysqlSupport ? true, mysql_jdbc ? null }:
1+{ lib, stdenv, fetchurl, jre, makeWrapper
2+, mysqlSupport ? true, mysql_jdbc
3+, postgresqlSupport ? true, postgresql_jdbc }:
34
4−assert mysqlSupport -> mysql_jdbc != null;
5−
6−with stdenv.lib;
75let
8− extraJars = optional mysqlSupport mysql_jdbc;
6+ extraJars =
7+ lib.optional mysqlSupport mysql_jdbc
8+ ++ lib.optional postgresqlSupport postgresql_jdbc;
99in
1010
1111stdenv.mkDerivation rec {
@@ -47,15 +47,15 @@ stdenv.mkDerivation rec {
4747 # taken from the executable script in the source
4848 CP="$out/liquibase.jar"
4949 ${addJars "$out/lib"}
50− ${concatStringsSep "\n" (map (p: addJars "${p}/share/java") extraJars)}
50+ ${lib.concatStringsSep "\n" (map (p: addJars "${p}/share/java") extraJars)}
5151
52− ${getBin jre}/bin/java -cp "\$CP" \$JAVA_OPTS \
52+ ${lib.getBin jre}/bin/java -cp "\$CP" \$JAVA_OPTS \
5353 liquibase.integration.commandline.Main \''${1+"\$@"}
5454 EOF
5555 chmod +x $out/bin/liquibase
5656 '';
5757
58− meta = {
58+ meta = with lib; {
5959 description = "Version Control for your database";
6060 homepage = "https://www.liquibase.org/";
6161 changelog = "https://raw.githubusercontent.com/liquibase/liquibase/v${version}/changelog.txt";