mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-16 06:47:09 +03:00
Merge pull request #47587 from peterhoeg/u/plantuml
plantuml: 1.2018.10 -> 1.2018.11
This commit is contained in:
commit
ae2bb82a8d
@ -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;
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user