From 9d14bfb7d5f4a58c763cf811c3ba51508f636f4b Mon Sep 17 00:00:00 2001 From: Gabriel Fontes Date: Thu, 10 Nov 2022 20:50:16 -0300 Subject: [PATCH] apgdiff: init at 2.7.0 Co-authored by: AndersonTorres --- .../tools/database/apgdiff/default.nix | 35 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 37 insertions(+) create mode 100644 pkgs/development/tools/database/apgdiff/default.nix diff --git a/pkgs/development/tools/database/apgdiff/default.nix b/pkgs/development/tools/database/apgdiff/default.nix new file mode 100644 index 000000000000..016259f0bbb4 --- /dev/null +++ b/pkgs/development/tools/database/apgdiff/default.nix @@ -0,0 +1,35 @@ +{ lib +, stdenvNoCC +, fetchurl +, makeWrapper +, jre +}: +stdenvNoCC.mkDerivation (finalAttrs: { + version = "2.7.0"; + pname = "apgdiff"; + + src = fetchurl { + url = "https://github.com/fordfrog/apgdiff/raw/release_${finalAttrs.version}/releases/apgdiff-${finalAttrs.version}.jar"; + sha256 = "sha256-6OempDmedl6LOwP/s5y0hOIxGDWHd7qM7/opW3UwQ+I="; + }; + + nativeBuildInputs = [ makeWrapper ]; + + buildCommand = '' + install -Dm644 $src $out/lib/apgdiff.jar + + mkdir -p $out/bin + makeWrapper ${jre}/bin/java $out/bin/apgdiff \ + --argv0 apgdiff \ + --add-flags "-jar $out/lib/apgdiff.jar" + ''; + + meta = with lib; { + description = "Another PostgreSQL diff tool"; + homepage = "https://apgdiff.com"; + license = licenses.mit; + inherit (jre.meta) platforms; + sourceProvenance = sourceTypes.binaryBytecode; + maintainers = [ maintainers.misterio77 ]; + }; +}) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8aca0fa76410..530e725ea0fe 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16203,6 +16203,8 @@ with pkgs; anybadge = with python3Packages; toPythonApplication anybadge; + apgdiff = callPackage ../development/tools/database/apgdiff { }; + apkg = callPackage ../tools/package-management/apkg { }; augeas = callPackage ../tools/system/augeas { };