2024-08-07 18:37:21 +02:00
|
|
|
{
|
|
|
|
stdenvNoCC,
|
|
|
|
lib,
|
|
|
|
fetchzip,
|
2024-10-23 14:42:36 +02:00
|
|
|
openjdk22,
|
2024-08-07 18:37:21 +02:00
|
|
|
makeDesktopItem,
|
|
|
|
javaPackages,
|
|
|
|
gsettings-desktop-schemas,
|
|
|
|
gtk3,
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
2024-10-23 14:42:36 +02:00
|
|
|
openjfx = javaPackages.openjfx22.override { withWebKit = true; };
|
|
|
|
jdk = openjdk22.override (
|
2024-08-07 18:37:21 +02:00
|
|
|
prev:
|
|
|
|
prev
|
|
|
|
// {
|
|
|
|
enableJavaFX = true;
|
|
|
|
inherit openjfx;
|
|
|
|
}
|
|
|
|
);
|
|
|
|
in
|
|
|
|
stdenvNoCC.mkDerivation rec {
|
|
|
|
version = "3.0.12";
|
|
|
|
pname = "minion";
|
|
|
|
|
|
|
|
src = fetchzip {
|
2024-10-23 14:42:36 +02:00
|
|
|
url = "https://cdn.mmoui.com/minion/v3/Minion${version}-java.zip";
|
2024-08-07 18:37:21 +02:00
|
|
|
hash = "sha256-KjSj3TBMY3y5kgIywtIDeil0L17dau/Rb2HuXAulSO8=";
|
|
|
|
stripRoot = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p "$out/bin"
|
|
|
|
mkdir -p "$out/lib/${pname}"
|
|
|
|
cp ./Minion-jfx.jar "$out/lib/${pname}/Minion-jfx.jar"
|
|
|
|
cp -r ./lib "$out/lib/${pname}/lib"
|
|
|
|
|
|
|
|
cat > "$out/bin/${pname}" << EOF
|
|
|
|
#!${stdenvNoCC.shell}
|
|
|
|
CLASSPATH="$out/lib"
|
|
|
|
XDG_DATA_DIRS="${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}:${gtk3}/share/gsettings-schemas/${gtk3.name}:XDG_DATA_DIRS"
|
2024-10-23 14:42:36 +02:00
|
|
|
exec ${lib.getExe jdk} \
|
|
|
|
--add-exports=javafx.graphics/com.sun.javafx.css=ALL-UNNAMED \
|
|
|
|
--add-exports=javafx.graphics/javafx.scene.image=ALL-UNNAMED \
|
|
|
|
--add-opens=javafx.graphics/javafx.scene.image=ALL-UNNAMED \
|
|
|
|
--add-opens=java.base/java.lang=ALL-UNNAMED \
|
|
|
|
-cp "$CLASSPATH ./lib" -jar "$out/lib/${pname}/Minion-jfx.jar" "\$@"
|
2024-08-07 18:37:21 +02:00
|
|
|
EOF
|
|
|
|
|
|
|
|
chmod a+x "$out/bin/${pname}"
|
|
|
|
|
|
|
|
'';
|
|
|
|
|
|
|
|
desktopItems = [
|
|
|
|
(makeDesktopItem {
|
|
|
|
name = "minion";
|
|
|
|
exec = "minion";
|
|
|
|
comment = "MMO Addon manager for Elder Scrolls Online and World of Warcraft";
|
|
|
|
desktopName = "Minion";
|
|
|
|
categories = [ "Game" ];
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2024-10-23 14:42:36 +02:00
|
|
|
description = "Addon manager for World of Warcraft and The Elder Scrolls Online";
|
|
|
|
homepage = "https://minion.mmoui.com/";
|
|
|
|
license = lib.licenses.unfree;
|
|
|
|
platforms = lib.platforms.all;
|
|
|
|
mainProgram = minion;
|
|
|
|
maintainers = with lib.maintainers; [ patrickdag ];
|
2024-08-07 18:37:21 +02:00
|
|
|
};
|
|
|
|
}
|