{ stdenv, fetchurl, jdk }: stdenv.mkDerivation rec { pname = "emem"; version = "0.2.19"; name = "${pname}-${version}"; inherit jdk; src = fetchurl { url = "https://github.com/ebzzry/${pname}/releases/download/v${version}/${pname}.jar"; sha256 = "1lrdfkw5bn9b5d4ggw3amnf31xxwpxccs2spgrrxggf8win6y50j"; }; 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} <