12 stdenv.mkDerivation rec {
16 src = fetchFromGitHub {
20 sha256 = "09qrhqhv264x8phnf3pnb0cwq75l7xdsj9xkwlvhry81nxz0d5v0";
23 nativeBuildInputs = [ ant makeWrapper copyDesktopItems ];
25 buildInputs = [ openjdk8 ];
28 # Fixes for building with Ant.
29 # https://github.com/chcandido/brModelo/pull/22
31 name = "fix-self-closing-element-not-allowed.patch";
32 url = "https://github.com/yuuyins/brModelo/commit/0d712b74fd5d29d67be07480ed196da28a77893b.patch";
33 sha256 = "sha256-yy03arE6xetotzyvpToi9o9crg3KnMRn1J70jDUvSXE=";
36 name = "fix-tag-closing.patch";
37 url = "https://github.com/yuuyins/brModelo/commit/e8530ff75f024cf6effe0408ed69985405e9709c.patch";
38 sha256 = "sha256-MNuh/ORbaAkB5qDSlA/nPrXN+tqzz4oOglVyEtSangI=";
41 name = "fix-bad-use-greater-than.patch";
42 url = "https://github.com/yuuyins/brModelo/commit/498a6ef8129daff5a472b318f93c8f7f2897fc7f.patch";
43 sha256 = "sha256-MmAwYUmx38DGRsiSxCWCObtpqxk0ykUQiDSC76bCpFc=";
46 name = "fix-param-errors.patch";
47 url = "https://github.com/yuuyins/brModelo/commit/8a508aaba0bcffe13a3f95cff495230beea36bc4.patch";
48 sha256 = "sha256-qME9gZChSMzu1vs9HaosD+snb+jlOrQLY97meNoA8oU=";
52 # https://github.com/chcandido/brModelo/pull/23
54 name = "add-brmodelo-logo-icons-svg.patch";
55 url = "https://github.com/yuuyins/brModelo/commit/f260b82b664fad3325bbf3ebd7a15488d496946b.patch";
56 sha256 = "sha256-UhgcWxsHkNFS1GgaRnmlZohjDR8JwHof2cIb3SBetYs=";
67 desktopName = "brModelo";
68 genericName = "Entity-relationship diagramming tool";
71 comment = meta.description;
72 categories = [ "Development" "Education" "Database" "2DGraphics" "ComputerScience" "DataVisualization" "Engineering" "Java" ];
77 install -d $out/bin $out/share/doc/${pname} $out/share/java
79 cp -rv ./dist/javadoc $out/share/doc/${pname}/
81 install -Dm755 ./dist/brModelo.jar -t $out/share/java/
82 # NOTE: The standard Java GUI toolkit has a
83 # hard-coded list of "non-reparenting" window managers,
84 # which cause issues while running brModelo
85 # in WMs that are not in that list (e.g. XMonad).
86 # Solution/Workaround: set the environment variable
87 # _JAVA_AWT_WM_NONREPARENTING=1.
88 makeWrapper ${openjdk8}/bin/java $out/bin/brmodelo \
89 --prefix _JAVA_AWT_WM_NONREPARENTING : 1 \
90 --prefix _JAVA_OPTIONS : "-Dawt.useSystemAAFontSettings=on" \
91 --add-flags "-jar $out/share/java/brModelo.jar"
97 for size in 16 24 32 48 64 128 256; do
98 install -Dm644 ./src/imagens/icone_"$size"x"$size".svg \
99 $out/share/icons/hicolor/"$size"x"$size"/apps/brmodelo.svg
104 description = "Entity-relationship diagram tool for making conceptual and logical database models";
105 homepage = "https://github.com/chcandido/brModelo";
106 license = licenses.gpl3;
107 maintainers = with maintainers; [ yuu ];