2017-08-26 13:44:39 +01:00
|
|
|
{ stdenv, fetchurl, jre_headless, makeWrapper }:
|
|
|
|
let
|
2018-11-01 18:58:51 +00:00
|
|
|
version = "5.2.1";
|
2017-08-26 13:44:39 +01: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";
|
|
|
|
sha256 = "0lm536qc8pqj4s21dd47gi99nwwflk17gqzfwaflghw3fnhn7i1s";
|
2017-08-26 13:44:39 +01:00
|
|
|
};
|
|
|
|
buildInputs = [ makeWrapper ];
|
|
|
|
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 13:44:39 +01: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 13:44:39 +01: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 13:44:39 +01:00
|
|
|
};
|
|
|
|
}
|