depot/third_party/nixpkgs/pkgs/tools/graphics/ditaa/default.nix
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04:00

34 lines
853 B
Nix

{ stdenv, fetchurl, jre }:
stdenv.mkDerivation rec {
name = "ditaa-0.11.0";
src = fetchurl {
url = "https://github.com/stathissideris/ditaa/releases/download/v0.11.0/ditaa-0.11.0-standalone.jar";
sha256 = "1acnl7khz8aasg230nbsx9dyf8716scgb5l3679cb2bdzxisl64l";
};
phases = [ "installPhase" ];
installPhase = ''
mkdir -p "$out/bin"
mkdir -p "$out/lib"
cp ${src} "$out/lib/ditaa.jar"
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 = "https://github.com/stathissideris/ditaa";
license = licenses.lgpl3;
platforms = platforms.unix;
maintainers = [ maintainers.bjornfor ];
};
}