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:
parent
edfefa6167
commit
fe520e6d1f
41
pkgs/tools/graphics/ditaa/default.nix
Normal file
41
pkgs/tools/graphics/ditaa/default.nix
Normal 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 ];
|
||||
};
|
||||
}
|
@ -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 { };
|
||||
|
Loading…
Reference in New Issue
Block a user