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";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "0.4.2";
|
2021-04-05 15:23:46 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/jagrosh/MusicBot/releases/download/${version}/JMusicBot-${version}.jar";
|
2024-07-27 06:49:29 +00:00
|
|
|
sha256 = "sha256-Jg6/ju3ADBd7fc3njRzoEDVjIL4SzAzlTc02I4Q9hz4=";
|
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;
|
2024-02-29 20:09:43 +00:00
|
|
|
mainProgram = "JMusicBot";
|
2021-04-05 15:23:46 +00:00
|
|
|
};
|
|
|
|
}
|