nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchzip,
5 jre,
6 makeWrapper,
7}:
8
9stdenv.mkDerivation (finalAttrs: {
10 pname = "schemacrawler";
11 version = "17.6.0";
12
13 src = fetchzip {
14 url = "https://github.com/schemacrawler/SchemaCrawler/releases/download/v${finalAttrs.version}/schemacrawler-${finalAttrs.version}-bin.zip";
15 hash = "sha256-GReeCRzYm3tQW6TQWcxx5DeUnROnN0W6mypzWs4wUec=";
16 };
17
18 nativeBuildInputs = [ makeWrapper ];
19
20 installPhase = ''
21 runHook preInstall
22
23 mkdir -p $out/bin
24 cp -r {config,lib} $out/
25
26 makeWrapper ${jre}/bin/java $out/bin/schemacrawler \
27 --add-flags "-cp $out/lib/*:$out/config" \
28 --add-flags schemacrawler.Main
29
30 runHook postInstall
31 '';
32
33 preferLocalBuild = true;
34
35 meta = {
36 description = "Database schema discovery and comprehension tool";
37 mainProgram = "schemacrawler";
38 homepage = "https://www.schemacrawler.com/";
39 sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
40 license = with lib.licenses; [
41 epl10
42 gpl3Only
43 lgpl3Only
44 ];
45 platforms = lib.platforms.unix;
46 maintainers = [ ];
47 };
48})