ditaa: new package

Ditaa is a small command-line utility written in Java, that can convert
diagrams drawn using ascii art ('drawings' that contain characters that
resemble lines like | / - ), into proper bitmap graphics.

Homepage: http://ditaa.sourceforge.net/
This commit is contained in:
Bjørn Forsman 2013-09-12 17:25:09 +02:00
parent edfefa6167
commit fe520e6d1f
2 changed files with 43 additions and 0 deletions

View File

@ -0,0 +1,41 @@
{ stdenv, fetchurl, unzip, jre }:
stdenv.mkDerivation rec {
name = "ditaa-0.9";
src = fetchurl {
name = "${name}.zip";
url = "mirror://sourceforge/project/ditaa/ditaa/0.9/ditaa0_9.zip";
sha256 = "12g6k3hacvyw3s9pijli7vfnkspyp37qkr29qgbmq1hbp0ryk2fn";
};
buildInputs = [ unzip ];
phases = [ "installPhase" ];
installPhase = ''
unzip "$src"
mkdir -p "$out/bin"
mkdir -p "$out/lib"
mkdir -p "$out/share/ditaa"
cp dita*.jar "$out/lib/ditaa.jar"
cp COPYING HISTORY "$out/share/ditaa"
cat > "$out/bin/ditaa" << EOF
#!${stdenv.shell}
exec ${jre}/bin/java -jar "$out/lib/ditaa.jar" "\$@"
EOF
chmod a+x "$out/bin/ditaa"
'';
meta = with stdenv.lib; {
description = "Convert ascii art diagrams into proper bitmap graphics";
homepage = http://ditaa.sourceforge.net/;
license = licenses.gpl2;
platforms = platforms.linux;
maintainers = [ maintainers.bjornfor ];
};
}

View File

@ -533,6 +533,8 @@ let
catdoc = callPackage ../tools/text/catdoc { };
ditaa = callPackage ../tools/graphics/ditaa { };
dlx = callPackage ../misc/emulators/dlx { };
eggdrop = callPackage ../tools/networking/eggdrop { };