Files
nixpkgs/pkgs/by-name/fl/flyway/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

54 lines
2.1 KiB
Nix

{
lib,
stdenv,
fetchurl,
jre_headless,
makeWrapper,
testers,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "flyway";
version = "11.13.0";
src = fetchurl {
url = "https://github.com/flyway/flyway/releases/download/flyway-${finalAttrs.version}/flyway-commandline-${finalAttrs.version}.tar.gz";
sha256 = "sha256-yIptnNIt76qYer9AhLRZ0hhuUhx56PWXU3jjkLBz11M=";
};
nativeBuildInputs = [ makeWrapper ];
dontBuild = true;
dontStrip = true;
installPhase = ''
mkdir -p $out/bin $out/share/flyway
cp -r drivers conf licenses README.txt $out/share/flyway
find lib -type f -name "*.jar" | while read -r file; do
dest="$out/share/flyway/lib/''${file#lib/}"
install -D "$file" "$dest"
done
makeWrapper "${jre_headless}/bin/java" $out/bin/flyway \
--add-flags "-Djava.security.egd=file:/dev/../dev/urandom" \
--add-flags "-classpath '$out/share/flyway/lib/*:$out/share/flyway/lib/flyway/*:$out/share/flyway/lib/aad/*:$out/share/flyway/lib/netty/*:$out/share/flyway/drivers/*'" \
--add-flags "org.flywaydb.commandline.Main" \
'';
passthru.tests = {
version = testers.testVersion { package = finalAttrs.finalPackage; };
};
meta = with lib; {
description = "Evolve your Database Schema easily and reliably across all your instances";
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.
'';
mainProgram = "flyway";
downloadPage = "https://github.com/flyway/flyway";
homepage = "https://flywaydb.org/";
changelog = "https://documentation.red-gate.com/fd/release-notes-for-flyway-engine-179732572.html";
sourceProvenance = with sourceTypes; [ binaryBytecode ];
license = licenses.asl20;
platforms = platforms.unix;
maintainers = [ maintainers.cmcdragonkai ];
};
})