summary refs log tree commit diff
path: root/pkgs/development/tools/database
diff options
context:
space:
mode:
authorRobert Helgesson <robert@rycee.net>2021-01-21 23:03:48 +0100
committerRobert Helgesson <robert@rycee.net>2021-01-21 23:12:43 +0100
commit62acc9aa8f142c297d496688a8305dad8b331483 (patch)
tree95e0c6164330ac932af69ce57375039bccfcd6c1 /pkgs/development/tools/database
parent2ab13ca162762e8728c3f9bdac92cd9c933ed41f (diff)
downloadnixpkgs-62acc9aa8f142c297d496688a8305dad8b331483.tar
nixpkgs-62acc9aa8f142c297d496688a8305dad8b331483.tar.gz
nixpkgs-62acc9aa8f142c297d496688a8305dad8b331483.tar.bz2
nixpkgs-62acc9aa8f142c297d496688a8305dad8b331483.tar.lz
nixpkgs-62acc9aa8f142c297d496688a8305dad8b331483.tar.xz
nixpkgs-62acc9aa8f142c297d496688a8305dad8b331483.tar.zst
nixpkgs-62acc9aa8f142c297d496688a8305dad8b331483.zip
liquibase: cleaning up
Diffstat (limited to 'pkgs/development/tools/database')
-rw-r--r--pkgs/development/tools/database/liquibase/default.nix15
1 files changed, 6 insertions, 9 deletions
diff --git a/pkgs/development/tools/database/liquibase/default.nix b/pkgs/development/tools/database/liquibase/default.nix
index 6eb24a812aa..2aa774940ec 100644
--- a/pkgs/development/tools/database/liquibase/default.nix
+++ b/pkgs/development/tools/database/liquibase/default.nix
@@ -1,11 +1,8 @@
-{ stdenv, fetchurl, jre, makeWrapper
-, mysqlSupport ? true, mysql_jdbc ? null }:
+{ lib, stdenv, fetchurl, jre, makeWrapper
+, mysqlSupport ? true, mysql_jdbc }:
 
-assert mysqlSupport -> mysql_jdbc != null;
-
-with stdenv.lib;
 let
-  extraJars = optional mysqlSupport mysql_jdbc;
+  extraJars = lib.optional mysqlSupport mysql_jdbc;
 in
 
 stdenv.mkDerivation rec {
@@ -47,15 +44,15 @@ stdenv.mkDerivation rec {
       # taken from the executable script in the source
       CP="$out/liquibase.jar"
       ${addJars "$out/lib"}
-      ${concatStringsSep "\n" (map (p: addJars "${p}/share/java") extraJars)}
+      ${lib.concatStringsSep "\n" (map (p: addJars "${p}/share/java") extraJars)}
 
-      ${getBin jre}/bin/java -cp "\$CP" \$JAVA_OPTS \
+      ${lib.getBin jre}/bin/java -cp "\$CP" \$JAVA_OPTS \
         liquibase.integration.commandline.Main \''${1+"\$@"}
       EOF
       chmod +x $out/bin/liquibase
   '';
 
-  meta = {
+  meta = with lib; {
     description = "Version Control for your database";
     homepage = "https://www.liquibase.org/";
     changelog = "https://raw.githubusercontent.com/liquibase/liquibase/v${version}/changelog.txt";