2017-08-26 13:44:39 +01:00
|
|
|
{ stdenv, fetchurl, jre_headless, makeWrapper }:
|
|
|
|
let
|
2020-11-25 04:28:50 +00:00
|
|
|
version = "7.2.1";
|
2017-08-26 13:44:39 +01:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
2019-08-13 22:52:01 +01:00
|
|
|
pname = "flyway";
|
|
|
|
inherit version;
|
2017-08-26 13:44:39 +01:00
|
|
|
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";
|
2020-11-25 04:28:50 +00:00
|
|
|
sha256 = "0b9pyy5avgr2wh3amnpwfc21i69mbw9a0xdxwg5wlrw83f5rx17w";
|
2017-08-26 13:44:39 +01:00
|
|
|
};
|
2018-12-16 20:15:55 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2017-08-26 13:44:39 +01: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
|
2019-11-29 21:44:45 +00:00
|
|
|
install -Dt $out/share/flyway/lib lib/community/*.jar lib/*.jar
|
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/*'" \
|
2020-01-02 18:28:13 +00:00
|
|
|
--add-flags "org.flywaydb.commandline.Main" \
|
|
|
|
--add-flags "-jarDirs='$out/share/flyway/jars'"
|
2017-08-26 13:44:39 +01:00
|
|
|
'';
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Evolve your Database Schema easily and reliably across all your instances";
|
2019-11-29 21:44:45 +00:00
|
|
|
longDescription = ''
|
|
|
|
The Flyway command-line tool is a standalone Flyway distribution.
|
|
|
|
It is primarily meant for users who wish to migrate their database from the command-line
|
|
|
|
without having to integrate Flyway into their applications nor having to install a build tool.
|
|
|
|
|
|
|
|
This package is only the Community Edition of the Flyway command-line tool.
|
|
|
|
'';
|
2017-08-26 13:44:39 +01:00
|
|
|
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
|
|
|
};
|
|
|
|
}
|