nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib, stdenv, fetchurl, jre, makeWrapper, graphviz }:
2
3stdenv.mkDerivation rec {
4 version = "6.1.0";
5 pname = "schemaspy";
6
7 src = fetchurl {
8 url = "https://github.com/schemaspy/schemaspy/releases/download/v${version}/${pname}-${version}.jar";
9 sha256 = "0lgz6b17hx9857fb2l03ggz8y3n8a37vrcsylif0gmkwj1v4qgl7";
10 };
11
12 dontUnpack = true;
13
14 buildInputs = [
15 jre
16 ];
17
18 nativeBuildInputs = [
19 makeWrapper
20 ];
21
22 wrappedPath = lib.makeBinPath [
23 graphviz
24 ];
25
26 installPhase = ''
27 install -D ${src} "$out/share/java/${pname}-${version}.jar"
28
29 makeWrapper ${jre}/bin/java $out/bin/schemaspy \
30 --add-flags "-jar $out/share/java/${pname}-${version}.jar" \
31 --prefix PATH : "$wrappedPath"
32 '';
33
34 meta = with lib; {
35 homepage = "http://schemaspy.org";
36 description = "Document your database simply and easily";
37 license = licenses.mit;
38 maintainers = with maintainers; [ jraygauthier ];
39 };
40}
41