2023-02-02 18:25:31 +00:00
|
|
|
{ stdenv, lib, fetchurl, makeWrapper, jre_headless }:
|
2021-04-05 15:23:46 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "JMusicBot";
|
2023-03-04 12:14:45 +00:00
|
|
|
version = "0.3.9";
|
2021-04-05 15:23:46 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/jagrosh/MusicBot/releases/download/${version}/JMusicBot-${version}.jar";
|
2023-03-04 12:14:45 +00:00
|
|
|
sha256 = "sha256-2A1yo2e1MawGLMTM6jWwpQJJuKOmljxFriORv90Jqg8=";
|
2021-04-05 15:23:46 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
dontUnpack = true;
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/lib
|
|
|
|
cp $src $out/lib/JMusicBot
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
makeWrapper ${jre_headless}/bin/java $out/bin/JMusicBot \
|
2022-02-20 05:27:41 +00:00
|
|
|
--add-flags "-Xmx1G -Dnogui=true -Djava.util.concurrent.ForkJoinPool.common.parallelism=1 -jar $out/lib/JMusicBot"
|
2021-04-05 15:23:46 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Discord music bot that's easy to set up and run yourself";
|
|
|
|
homepage = "https://github.com/jagrosh/MusicBot";
|
2022-06-16 17:23:12 +00:00
|
|
|
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
2021-04-05 15:23:46 +00:00
|
|
|
license = licenses.asl20;
|
2023-08-04 22:07:22 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2023-02-02 18:25:31 +00:00
|
|
|
inherit (jre_headless.meta) platforms;
|
2021-04-05 15:23:46 +00:00
|
|
|
};
|
|
|
|
}
|