2017-08-26 12:44:39 +00:00
|
|
|
{ stdenv, fetchurl, jre_headless, makeWrapper }:
|
|
|
|
let
|
2018-12-16 20:15:55 +00:00
|
|
|
version = "5.2.4";
|
2017-08-26 12:44:39 +00:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "flyway-${version}";
|
|
|
|
src = fetchurl {
|
2018-11-01 18:58:51 +00:00
|
|
|
url = "https://repo1.maven.org/maven2/org/flywaydb/flyway-commandline/${version}/flyway-commandline-${version}.tar.gz";
|
2018-12-16 20:15:55 +00:00
|
|
|
sha256 = "16ia6nlvj4cgmdkn66bjg73h5vah82hpzk9mf0n5kmqnwcaa8hmc";
|
2017-08-26 12:44:39 +00:00
|
|
|
};
|
2018-12-16 20:15:55 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2017-08-26 12:44:39 +00:00
|
|
|
dontBuild = true;
|
|
|
|
dontStrip = true;
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin $out/share/flyway
|
2018-11-01 18:58:51 +00:00
|
|
|
cp -r sql jars drivers conf $out/share/flyway
|
|
|
|
cp -r lib/community $out/share/flyway/lib
|
2017-08-26 12:44:39 +00:00
|
|
|
makeWrapper "${jre_headless}/bin/java" $out/bin/flyway \
|
|
|
|
--add-flags "-Djava.security.egd=file:/dev/../dev/urandom" \
|
2018-11-01 18:58:51 +00:00
|
|
|
--add-flags "-classpath '$out/share/flyway/lib/*:$out/share/flyway/drivers/*'" \
|
2017-08-26 12:44:39 +00:00
|
|
|
--add-flags "org.flywaydb.commandline.Main"
|
|
|
|
'';
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Evolve your Database Schema easily and reliably across all your instances";
|
|
|
|
homepage = "https://flywaydb.org/";
|
|
|
|
license = licenses.asl20;
|
2018-03-07 16:01:02 +00:00
|
|
|
platforms = platforms.unix;
|
2017-12-05 22:20:11 +00:00
|
|
|
maintainers = [ maintainers.cmcdragonkai ];
|
2017-08-26 12:44:39 +00:00
|
|
|
};
|
|
|
|
}
|