c7cb07f092
GitOrigin-RevId: 1536926ef5621b09bba54035ae2bb6d806d72ac8
48 lines
1.2 KiB
Nix
48 lines
1.2 KiB
Nix
{ lib
|
|
, stdenvNoCC
|
|
, fetchurl
|
|
, makeBinaryWrapper
|
|
, jre
|
|
, graphviz
|
|
}:
|
|
|
|
stdenvNoCC.mkDerivation (finalAttrs: {
|
|
pname = "plantuml";
|
|
version = "1.2024.3";
|
|
|
|
src = fetchurl {
|
|
url = "https://github.com/plantuml/plantuml/releases/download/v${finalAttrs.version}/plantuml-pdf-${finalAttrs.version}.jar";
|
|
hash = "sha256-zgpqXawlIdNgSxiOjtk7XLOnrVVD09T5qE9K8LD4TtY=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
makeBinaryWrapper
|
|
];
|
|
|
|
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"
|
|
'';
|
|
|
|
doInstallCheck = true;
|
|
postCheckInstall = ''
|
|
$out/bin/plantuml -help
|
|
$out/bin/plantuml -testdot
|
|
'';
|
|
|
|
meta = {
|
|
description = "Draw UML diagrams using a simple and human readable text description";
|
|
homepage = "https://plantuml.com/";
|
|
# "plantuml -license" says GPLv3 or later
|
|
license = lib.licenses.gpl3Plus;
|
|
mainProgram = "plantuml";
|
|
maintainers = with lib.maintainers; [ bjornfor Mogria ];
|
|
platforms = lib.platforms.unix;
|
|
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
|
|
};
|
|
})
|