This repository has been archived by the owner on Apr 12, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
14 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
}; | ||
} |