fix(servers): switch to working fork of jmusicbots
All checks were successful
Discord / discord commits (push) Successful in 57s

This commit is contained in:
matt1432 2024-09-27 12:23:04 -04:00
parent 79e6a55583
commit bfe6c7c05c

View file

@ -1,8 +1,43 @@
pkgs: # Locked
pkgs.dockerTools.pullImage { pkgs: let
imageName = "craumix/jmusicbot"; dname = "jmusicbot-docker";
imageDigest = "sha256:ba0d7e7e4b1dba86981687e3c8ada6b7a7170c6b4884c12a16c6ee046e2df763"; dtag = pkgs.jmusicbot.version;
sha256 = "1h7fwbr4wlyxjdynfs7fb6yb0j7ng16v10q646mdblvlflngpf9s";
finalImageName = "craumix/jmusicbot"; jre_modules = [
finalImageTag = "latest"; "java.se"
"jdk.crypto.cryptoki"
];
jre =
(pkgs.jre_minimal.overrideAttrs {
buildPhase = ''
runHook preBuild
# further optimizations for image size https://github.com/NixOS/nixpkgs/issues/169775
jlink --module-path ${pkgs.jdk11_headless}/lib/openjdk/jmods --add-modules ${pkgs.lib.concatStringsSep "," jre_modules} --no-header-files --no-man-pages --compress=2 --output $out
runHook postBuild
'';
})
.override {jdk = pkgs.jdk11_headless;};
jmusicbot =
(pkgs.jmusicbot.overrideAttrs rec {
version = "0.4.3.1";
src = pkgs.fetchurl {
url = "https://github.com/xPrinny/MusicBot/releases/download/${version}/JMusicBot-${version}.jar";
sha256 = "sha256-35JdmLArl9ssYDpdKDsBx3lu6TCN1JiCBI34W+uyVJ0=";
};
meta.platforms = ["x86_64-linux"];
})
.override {jre_headless = jre;};
in
pkgs.dockerTools.buildLayeredImage {
name = dname;
tag = dtag;
config = {
created = "now";
Cmd = ["${jmusicbot}/bin/JMusicBot"];
WorkingDir = "/jmb/config";
Volumes."/jmb/config" = {};
};
} }