fix(servers): switch to working fork of jmusicbots
All checks were successful
Discord / discord commits (push) Successful in 57s
All checks were successful
Discord / discord commits (push) Successful in 57s
This commit is contained in:
parent
79e6a55583
commit
bfe6c7c05c
1 changed files with 43 additions and 8 deletions
|
@ -1,8 +1,43 @@
|
|||
pkgs:
|
||||
pkgs.dockerTools.pullImage {
|
||||
imageName = "craumix/jmusicbot";
|
||||
imageDigest = "sha256:ba0d7e7e4b1dba86981687e3c8ada6b7a7170c6b4884c12a16c6ee046e2df763";
|
||||
sha256 = "1h7fwbr4wlyxjdynfs7fb6yb0j7ng16v10q646mdblvlflngpf9s";
|
||||
finalImageName = "craumix/jmusicbot";
|
||||
finalImageTag = "latest";
|
||||
# Locked
|
||||
pkgs: let
|
||||
dname = "jmusicbot-docker";
|
||||
dtag = pkgs.jmusicbot.version;
|
||||
|
||||
jre_modules = [
|
||||
"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" = {};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue