{ stdenv, fetchurl, jdk }: stdenv.mkDerivation rec { pname = "emem"; version = "0.2.16"; name = "${pname}-${version}"; inherit jdk; src = fetchurl { url = "https://github.com/ebzzry/${pname}/releases/download/v${version}/${pname}.jar"; sha256 = "1j6i40mcfwcx85zv0pxpwrqj0zy9s5qd7j63zdqf0lckkjvyrih9"; }; buildInputs = [ ]; phases = [ "buildPhase" "installPhase" ]; buildPhase = '' mkdir -p $out/bin mkdir -p $out/share/java ''; installPhase = '' cp $src $out/share/java/${pname}.jar cat > $out/bin/${pname} <