base16-schemes: unstable-2024-06-21 -> unstable-2024-11-12
[NixPkgs.git] / pkgs / by-name / sc / schemacrawler / package.nix
blob70d54d077445540034a9ea0fc92d3077b43adaad
1 { lib
2 , stdenv
3 , fetchzip
4 , jre
5 , makeWrapper
6 }:
8 stdenv.mkDerivation (finalAttrs: {
9   pname = "schemacrawler";
10   version = "16.22.2";
12   src = fetchzip {
13     url = "https://github.com/schemacrawler/SchemaCrawler/releases/download/v${finalAttrs.version}/schemacrawler-${finalAttrs.version}-bin.zip";
14     hash = "sha256-N08lKCTbpX4b05i4UcCEy6wycsiIJu5BRr7EZ3oZ1rA=";
15   };
17   nativeBuildInputs = [ makeWrapper ];
19   installPhase = ''
20     runHook preInstall
22     mkdir -p $out/bin
23     cp -r {config,lib} $out/
25     makeWrapper ${jre}/bin/java $out/bin/schemacrawler \
26       --add-flags "-cp $out/lib/*:$out/config" \
27       --add-flags schemacrawler.Main
29     runHook postInstall
30   '';
32   preferLocalBuild = true;
34   meta = with lib; {
35     description = "Database schema discovery and comprehension tool";
36     mainProgram = "schemacrawler";
37     homepage = "https://www.schemacrawler.com/";
38     sourceProvenance = with sourceTypes; [ binaryBytecode ];
39     license = with licenses; [ epl10 gpl3Only lgpl3Only ];
40     platforms = platforms.unix;
41     maintainers = with maintainers; [ elohmeier ];
42   };