571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
34 lines
996 B
Nix
34 lines
996 B
Nix
{ stdenv, lib, fetchurl, makeWrapper, jre_headless }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "JMusicBot";
|
|
version = "0.4.3";
|
|
|
|
src = fetchurl {
|
|
url = "https://github.com/jagrosh/MusicBot/releases/download/${version}/JMusicBot-${version}.jar";
|
|
sha256 = "sha256-7CHFc94Fe6ip7RY+XJR9gWpZPKM5JY7utHp8C3paU9s=";
|
|
};
|
|
|
|
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";
|
|
};
|
|
}
|