2024-02-29 20:09:43 +00:00
|
|
|
{ lib
|
|
|
|
, stdenvNoCC
|
|
|
|
, fetchurl
|
|
|
|
, makeBinaryWrapper
|
|
|
|
, jre
|
|
|
|
, graphviz
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
stdenvNoCC.mkDerivation (finalAttrs: {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "plantuml";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "1.2024.5";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2024-02-29 20:09:43 +00:00
|
|
|
url = "https://github.com/plantuml/plantuml/releases/download/v${finalAttrs.version}/plantuml-pdf-${finalAttrs.version}.jar";
|
2024-06-05 15:53:02 +00:00
|
|
|
hash = "sha256-YayIedHIIpecVF7BZSvBTp66Eb7He+l+1RCir5KuL28=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
makeBinaryWrapper
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildCommand = ''
|
|
|
|
install -Dm644 $src $out/lib/plantuml.jar
|
|
|
|
|
|
|
|
mkdir -p $out/bin
|
|
|
|
makeWrapper ${jre}/bin/java $out/bin/plantuml \
|
|
|
|
--argv0 plantuml \
|
|
|
|
--set GRAPHVIZ_DOT ${graphviz}/bin/dot \
|
|
|
|
--add-flags "-jar $out/lib/plantuml.jar"
|
2024-02-29 20:09:43 +00:00
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
doInstallCheck = true;
|
|
|
|
postCheckInstall = ''
|
2020-04-24 23:36:52 +00:00
|
|
|
$out/bin/plantuml -help
|
2024-02-29 20:09:43 +00:00
|
|
|
$out/bin/plantuml -testdot
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
meta = {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Draw UML diagrams using a simple and human readable text description";
|
2023-11-16 04:20:00 +00:00
|
|
|
homepage = "https://plantuml.com/";
|
2020-04-24 23:36:52 +00:00
|
|
|
# "plantuml -license" says GPLv3 or later
|
2024-02-29 20:09:43 +00:00
|
|
|
license = lib.licenses.gpl3Plus;
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "plantuml";
|
2024-02-29 20:09:43 +00:00
|
|
|
maintainers = with lib.maintainers; [ bjornfor Mogria ];
|
|
|
|
platforms = lib.platforms.unix;
|
|
|
|
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2024-02-29 20:09:43 +00:00
|
|
|
})
|