nixpkgs/pkgs/applications/audio/jmusicbot/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

33 lines
983 B
Nix
Raw Normal View History

2023-01-31 15:10:33 +00:00
{ stdenv, lib, fetchurl, makeWrapper, jre_headless }:
2021-03-27 22:34:37 +00:00
stdenv.mkDerivation rec {
pname = "JMusicBot";
2023-03-03 22:34:04 +00:00
version = "0.3.9";
2021-03-27 22:34:37 +00:00
src = fetchurl {
url = "https://github.com/jagrosh/MusicBot/releases/download/${version}/JMusicBot-${version}.jar";
2023-03-03 22:34:04 +00:00
sha256 = "sha256-2A1yo2e1MawGLMTM6jWwpQJJuKOmljxFriORv90Jqg8=";
2021-03-27 22:34:37 +00:00
};
dontUnpack = true;
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
mkdir -p $out/lib
cp $src $out/lib/JMusicBot
2023-01-31 15:10:33 +00:00
makeWrapper ${jre_headless}/bin/java $out/bin/JMusicBot \
2022-02-16 21:19:59 +00:00
--add-flags "-Xmx1G -Dnogui=true -Djava.util.concurrent.ForkJoinPool.common.parallelism=1 -jar $out/lib/JMusicBot"
2021-03-27 22:34:37 +00:00
'';
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 ];
2021-03-27 22:34:37 +00:00
license = licenses.asl20;
2023-07-23 17:30:22 +00:00
maintainers = with maintainers; [ ];
2023-01-31 15:10:33 +00:00
inherit (jre_headless.meta) platforms;
2021-03-27 22:34:37 +00:00
};
}