Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / tools / database / apgdiff / default.nix
blobd96e3dbd99d04564bc1e68a84124c6562ef2cc59
1 { lib
2 , stdenvNoCC
3 , fetchurl
4 , makeWrapper
5 , jre
6 }:
7 stdenvNoCC.mkDerivation (finalAttrs: {
8   version = "2.7.0";
9   pname = "apgdiff";
11   src = fetchurl {
12     url = "https://github.com/fordfrog/apgdiff/raw/release_${finalAttrs.version}/releases/apgdiff-${finalAttrs.version}.jar";
13     sha256 = "sha256-6OempDmedl6LOwP/s5y0hOIxGDWHd7qM7/opW3UwQ+I=";
14   };
16   nativeBuildInputs = [ makeWrapper ];
18   buildCommand = ''
19     install -Dm644 $src $out/lib/apgdiff.jar
21     mkdir -p $out/bin
22     makeWrapper ${jre}/bin/java $out/bin/apgdiff \
23       --argv0 apgdiff \
24       --add-flags "-jar $out/lib/apgdiff.jar"
25   '';
27   meta = with lib; {
28     description = "Another PostgreSQL diff tool";
29     homepage = "https://apgdiff.com";
30     license = licenses.mit;
31     inherit (jre.meta) platforms;
32     sourceProvenance = [ sourceTypes.binaryBytecode ];
33     maintainers = [ maintainers.misterio77 ];
34   };