2015-11-24 20:09:16 +01:00
|
|
|
{ stdenv, fetchurl, jdk }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "emem";
|
2016-03-18 08:17:45 +01:00
|
|
|
version = "0.2.14";
|
2015-11-24 20:09:16 +01:00
|
|
|
name = "${pname}-${version}";
|
|
|
|
|
|
|
|
inherit jdk;
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/ebzzry/${pname}/releases/download/v${version}/${pname}.jar";
|
2016-03-18 08:17:45 +01:00
|
|
|
sha256 = "15q2n4a9m8zqi0wb7dyf3xiw78qvvz5zhxyff38xak5n7bvs51jc";
|
2015-11-24 20:09:16 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ ];
|
|
|
|
|
|
|
|
phases = [ "buildPhase" "installPhase" ];
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
mkdir -p $out/share/java
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2016-03-16 01:14:28 +01:00
|
|
|
cp $src $out/share/java/${pname}.jar
|
2015-11-24 20:09:16 +01:00
|
|
|
|
2016-03-16 01:14:28 +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
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = https://github.com/ebzzry/emem;
|
|
|
|
description = "A trivial Markdown to HTML converter";
|
|
|
|
license = licenses.epl10;
|
|
|
|
maintainers = [ maintainers.ebzzry ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|