2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchurl, jre }:
|
2013-09-12 15:25:09 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-07-20 16:27:58 +00:00
|
|
|
pname = "ditaa";
|
|
|
|
version = "0.11.0";
|
2013-09-12 15:25:09 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-07-20 16:27:58 +00:00
|
|
|
url = "https://github.com/stathissideris/ditaa/releases/download/v${version}/ditaa-${version}-standalone.jar";
|
2018-01-30 08:45:50 +00:00
|
|
|
sha256 = "1acnl7khz8aasg230nbsx9dyf8716scgb5l3679cb2bdzxisl64l";
|
2013-09-12 15:25:09 +00:00
|
|
|
};
|
|
|
|
|
2021-07-20 10:15:36 +00:00
|
|
|
dontUnpack = true;
|
2013-09-12 15:25:09 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
2021-07-20 16:27:58 +00:00
|
|
|
mkdir -p $out/bin $out/lib
|
2013-09-12 15:25:09 +00:00
|
|
|
|
2018-01-30 08:45:50 +00:00
|
|
|
cp ${src} "$out/lib/ditaa.jar"
|
2013-09-12 15:25:09 +00:00
|
|
|
|
|
|
|
cat > "$out/bin/ditaa" << EOF
|
|
|
|
#!${stdenv.shell}
|
|
|
|
exec ${jre}/bin/java -jar "$out/lib/ditaa.jar" "\$@"
|
|
|
|
EOF
|
|
|
|
|
|
|
|
chmod a+x "$out/bin/ditaa"
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2013-09-12 15:25:09 +00:00
|
|
|
description = "Convert ascii art diagrams into proper bitmap graphics";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/stathissideris/ditaa";
|
2022-06-02 13:38:41 +00:00
|
|
|
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
2018-01-30 08:45:50 +00:00
|
|
|
license = licenses.lgpl3;
|
2017-05-30 06:35:05 +00:00
|
|
|
platforms = platforms.unix;
|
2013-09-12 15:25:09 +00:00
|
|
|
maintainers = [ maintainers.bjornfor ];
|
|
|
|
};
|
|
|
|
}
|