plantuml: 1.2018.10 -> 1.2018.11

This commit is contained in:
Peter Hoeg 2018-10-01 17:15:00 +08:00
parent 46651b82b8
commit 6d90961e69

View File

@ -1,37 +1,34 @@
{ stdenv, fetchurl, jre, graphviz }:
{ stdenv, fetchurl, makeWrapper, jre, graphviz }:
stdenv.mkDerivation rec {
version = "1.2018.10";
version = "1.2018.11";
name = "plantuml-${version}";
src = fetchurl {
url = "mirror://sourceforge/project/plantuml/${version}/plantuml.${version}.jar";
sha256 = "19s3zrfri388nfykcs67sfk0dhmiw0rcv0dvj1j4c0fkyhl41bjs";
sha256 = "006bpxz6zsjypxscxbnz3b7icg47bfwcq1v7rvijflchw12hq9nm";
};
# It's only a .jar file and a shell wrapper
phases = [ "installPhase" ];
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
mkdir -p "$out/bin"
mkdir -p "$out/lib"
buildCommand = ''
install -Dm644 $src $out/lib/plantuml.jar
cp "$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"
cat > "$out/bin/plantuml" << EOF
#!${stdenv.shell}
export GRAPHVIZ_DOT="${graphviz}/bin/dot"
exec "${jre}/bin/java" -jar "$out/lib/plantuml.jar" "\$@"
EOF
chmod a+x "$out/bin/plantuml"
$out/bin/plantuml -help
'';
meta = with stdenv.lib; {
description = "Draw UML diagrams using a simple and human readable text description";
homepage = http://plantuml.sourceforge.net/;
# "java -jar plantuml.jar -license" says GPLv3 or later
# "plantuml -license" says GPLv3 or later
license = licenses.gpl3Plus;
maintainers = [ maintainers.bjornfor ];
maintainers = with maintainers; [ bjornfor ];
platforms = platforms.unix;
};
}