2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv, fetchurl, jdk }:
|
2015-11-24 20:09:16 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "emem";
|
2017-12-04 10:22:36 +01:00
|
|
|
version = "0.2.50";
|
2015-11-24 20:09:16 +01:00
|
|
|
|
|
|
|
inherit jdk;
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/ebzzry/${pname}/releases/download/v${version}/${pname}.jar";
|
2017-12-04 10:22:36 +01:00
|
|
|
sha256 = "18x3s3jrph8k3pc75jgwkfqazygpsx93zjxx68zms58my17cybh1";
|
2015-11-24 20:09:16 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
phases = [ "buildPhase" "installPhase" ];
|
|
|
|
|
|
|
|
buildPhase = ''
|
2017-03-15 03:33:32 +01:00
|
|
|
mkdir -p $out/bin $out/share/java
|
2015-11-24 20:09:16 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2016-03-16 01:14:28 +01:00
|
|
|
cp $src $out/share/java/${pname}.jar
|
2015-11-24 20:09:16 +01:00
|
|
|
|
2017-03-19 02:25:58 +01:00
|
|
|
cat > $out/bin/${pname} << EOF
|
2015-11-24 20:09:16 +01:00
|
|
|
#! $SHELL
|
2016-03-16 01:14:28 +01:00
|
|
|
$jdk/bin/java -jar $out/share/java/${pname}.jar "\$@"
|
2015-11-24 20:09:16 +01:00
|
|
|
EOF
|
|
|
|
|
2016-03-16 01:14:28 +01:00
|
|
|
chmod +x $out/bin/${pname}
|
2015-11-24 20:09:16 +01:00
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/ebzzry/emem";
|
2015-11-24 20:09:16 +01:00
|
|
|
description = "A trivial Markdown to HTML converter";
|
|
|
|
license = licenses.epl10;
|
|
|
|
maintainers = [ maintainers.ebzzry ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|