2025-01-25 11:41:14 -05:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
fetchurl,
|
|
|
|
jmusicbot,
|
|
|
|
jdk11_headless,
|
|
|
|
jre_minimal,
|
|
|
|
...
|
|
|
|
}: let
|
|
|
|
inherit (lib) concatStringsSep;
|
|
|
|
|
|
|
|
jre_modules = [
|
|
|
|
"java.se"
|
|
|
|
"jdk.crypto.cryptoki"
|
|
|
|
];
|
|
|
|
|
|
|
|
jre = (jre_minimal.override {jdk = jdk11_headless;}).overrideAttrs (o: {
|
|
|
|
buildPhase = ''
|
|
|
|
runHook preBuild
|
|
|
|
|
|
|
|
# further optimizations for image size https://github.com/NixOS/nixpkgs/issues/169775
|
|
|
|
jlink \
|
|
|
|
--module-path ${jdk11_headless}/lib/openjdk/jmods \
|
|
|
|
--add-modules ${concatStringsSep "," jre_modules} \
|
|
|
|
--no-header-files \
|
|
|
|
--no-man-pages \
|
|
|
|
--compress=2 \
|
|
|
|
--output $out
|
|
|
|
|
|
|
|
runHook postBuild
|
|
|
|
'';
|
|
|
|
});
|
|
|
|
in
|
|
|
|
(jmusicbot.override {jre_headless = jre;}).overrideAttrs (o: rec {
|
2025-01-25 11:51:22 -05:00
|
|
|
version = "0.4.3.3";
|
2025-01-25 11:41:14 -05:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/xPrinny/MusicBot/releases/download/${version}/JMusicBot-${version}.jar";
|
2025-01-25 11:51:22 -05:00
|
|
|
sha256 = "sha256-NYUT0FhSIqt+SECOKdnqBNQ37qinkwNWIzpXw8+7FXg=";
|
2025-01-25 11:41:14 -05:00
|
|
|
};
|
2025-01-28 03:43:52 -05:00
|
|
|
meta = o.meta // {platforms = ["x86_64-linux"];};
|
2025-01-25 11:41:14 -05:00
|
|
|
})
|