2024-09-22 15:11:28 +01:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenvNoCC,
|
|
|
|
fetchurl,
|
|
|
|
graphviz,
|
|
|
|
jre,
|
|
|
|
makeBinaryWrapper,
|
2024-09-22 15:34:55 +01:00
|
|
|
testers,
|
2024-02-15 21:22:35 +00:00
|
|
|
}:
|
2013-10-14 18:27:11 +01:00
|
|
|
|
2024-02-15 21:22:35 +00:00
|
|
|
stdenvNoCC.mkDerivation (finalAttrs: {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "plantuml";
|
2024-11-16 09:02:34 +00:00
|
|
|
version = "1.2024.8";
|
2013-10-14 18:27:11 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2024-02-15 21:22:35 +00:00
|
|
|
url = "https://github.com/plantuml/plantuml/releases/download/v${finalAttrs.version}/plantuml-pdf-${finalAttrs.version}.jar";
|
2024-11-16 09:02:34 +00:00
|
|
|
hash = "sha256-mMhhdkR2/Sh60dmvAu63+PGryg6+UrpoE1mqQaZ7wm0=";
|
2013-10-14 18:27:11 +01:00
|
|
|
};
|
|
|
|
|
2024-02-15 21:22:35 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
makeBinaryWrapper
|
|
|
|
];
|
2013-10-14 18:27:11 +01:00
|
|
|
|
2018-10-01 10:15:00 +01:00
|
|
|
buildCommand = ''
|
|
|
|
install -Dm644 $src $out/lib/plantuml.jar
|
2013-10-14 18:27:11 +01:00
|
|
|
|
2018-10-01 10:15:00 +01:00
|
|
|
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-15 21:22:35 +00:00
|
|
|
'';
|
2013-10-14 18:27:11 +01:00
|
|
|
|
2024-02-15 21:22:35 +00:00
|
|
|
doInstallCheck = true;
|
2024-09-22 15:11:28 +01:00
|
|
|
|
2024-02-15 21:22:35 +00:00
|
|
|
postCheckInstall = ''
|
2018-10-01 10:15:00 +01:00
|
|
|
$out/bin/plantuml -help
|
2024-02-15 21:22:35 +00:00
|
|
|
$out/bin/plantuml -testdot
|
2013-10-14 18:27:11 +01:00
|
|
|
'';
|
|
|
|
|
2024-09-22 15:34:55 +01:00
|
|
|
passthru.tests.version = testers.testVersion {
|
|
|
|
package = finalAttrs.finalPackage;
|
|
|
|
command = "plantuml --version";
|
|
|
|
};
|
|
|
|
|
2024-02-15 21:22:35 +00:00
|
|
|
meta = {
|
2013-10-14 18:27:11 +01:00
|
|
|
description = "Draw UML diagrams using a simple and human readable text description";
|
2023-10-30 20:41:44 +00:00
|
|
|
homepage = "https://plantuml.com/";
|
2018-10-01 10:15:00 +01:00
|
|
|
# "plantuml -license" says GPLv3 or later
|
2024-02-15 21:22:35 +00:00
|
|
|
license = lib.licenses.gpl3Plus;
|
2023-11-27 01:17:53 +00:00
|
|
|
mainProgram = "plantuml";
|
2024-09-22 15:11:28 +01:00
|
|
|
maintainers = with lib.maintainers; [
|
|
|
|
bjornfor
|
|
|
|
Mogria
|
2024-09-22 15:36:45 +01:00
|
|
|
anthonyroussel
|
2024-09-22 15:11:28 +01:00
|
|
|
];
|
2024-02-15 21:22:35 +00:00
|
|
|
platforms = lib.platforms.unix;
|
|
|
|
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
|
2013-10-14 18:27:11 +01:00
|
|
|
};
|
2024-02-15 21:22:35 +00:00
|
|
|
})
|