5ca88bfbb9
GitOrigin-RevId: 9f918d616c5321ad374ae6cb5ea89c9e04bf3e58
33 lines
996 B
Nix
33 lines
996 B
Nix
{ stdenv, lib, fetchurl, makeWrapper, jre_headless }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "JMusicBot";
|
|
version = "0.4.2";
|
|
|
|
src = fetchurl {
|
|
url = "https://github.com/jagrosh/MusicBot/releases/download/${version}/JMusicBot-${version}.jar";
|
|
sha256 = "sha256-Jg6/ju3ADBd7fc3njRzoEDVjIL4SzAzlTc02I4Q9hz4=";
|
|
};
|
|
|
|
dontUnpack = true;
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
installPhase = ''
|
|
mkdir -p $out/lib
|
|
cp $src $out/lib/JMusicBot
|
|
|
|
makeWrapper ${jre_headless}/bin/java $out/bin/JMusicBot \
|
|
--add-flags "-Xmx1G -Dnogui=true -Djava.util.concurrent.ForkJoinPool.common.parallelism=1 -jar $out/lib/JMusicBot"
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Discord music bot that's easy to set up and run yourself";
|
|
homepage = "https://github.com/jagrosh/MusicBot";
|
|
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
|
license = licenses.asl20;
|
|
maintainers = [ ];
|
|
inherit (jre_headless.meta) platforms;
|
|
mainProgram = "JMusicBot";
|
|
};
|
|
}
|