-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
minion: init at 3.0.12 #350303
base: master
Are you sure you want to change the base?
minion: init at 3.0.12 #350303
Conversation
diff --git a/pkgs/by-name/mi/minion/package.nix b/pkgs/by-name/mi/minion/package.nix
index 19cd5de8d478..a166e5d67679 100644
--- a/pkgs/by-name/mi/minion/package.nix
+++ b/pkgs/by-name/mi/minion/package.nix
@@ -2,23 +2,27 @@
stdenvNoCC,
lib,
fetchzip,
- openjdk22,
+ openjfx21,
+ openjdk21,
makeDesktopItem,
- javaPackages,
- gsettings-desktop-schemas,
- gtk3,
+ wrapGAppsHook3,
+ makeBinaryWrapper,
}:
let
- openjfx = javaPackages.openjfx22.override { withWebKit = true; };
- jdk = openjdk22.override (
- prev:
- prev
- // {
- enableJavaFX = true;
- inherit openjfx;
- }
- );
+ openjfx = openjfx21.override { withWebKit = true; };
+ openjdk = openjdk21.override {
+ enableJavaFX = true;
+ inherit openjfx;
+ };
+
+ jvmArgs = [
+ "-cp $out/share/minion/lib"
+ "--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"
+ ];
in
stdenvNoCC.mkDerivation rec {
version = "3.0.12";
@@ -30,26 +34,24 @@ stdenvNoCC.mkDerivation rec {
stripRoot = false;
};
+ nativeBuildInputs = [
+ makeBinaryWrapper
+ wrapGAppsHook3
+ ];
+
+ dontWrapGApps = true;
+
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"
+ runHook preInstall
- 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"
- 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" "\$@"
- EOF
+ install -D Minion-jfx.jar "$out/share/minion/Minion-jfx.jar"
+ cp -r ./lib "$out/share/minion/"
- chmod a+x "$out/bin/${pname}"
+ makeWrapper ${lib.getExe openjdk} $out/bin/minion \
+ "''${gappsWrapperArgs[@]}" \
+ --add-flags "${lib.concatStringsSep " " jvmArgs} -jar $out/share/minion/Minion-jfx.jar"
+ runHook postInstall
'';
desktopItems = [
@@ -67,7 +69,7 @@ stdenvNoCC.mkDerivation rec {
homepage = "https://minion.mmoui.com/";
license = lib.licenses.unfree;
platforms = lib.platforms.all;
- mainProgram = minion;
+ mainProgram = "minion";
maintainers = with lib.maintainers; [ patrickdag ];
};
} |
92be37f
to
ef1cd26
Compare
Turns out openjdk isn't actually a package, but an basically an alias that on linux evaluates to a normal build of openjdk but on darwin it realizes as zulu package, which doesn't support overwriting the openjfx version at build time. This resulted in the eval fails we've been getting. I'm sure there is a way around that, or maybe the overwrite isn't even needed on those builds, but in absence of any apple hardware I can't really test it so I've had to disable darwin support for now. |
9df0356
to
da0263a
Compare
Thanks for taking this, I don't use my personal version anymore so I'm glad it was useful to someone else 🙂 |
pkgs/by-name/mi/minion/package.nix
Outdated
openjfx = openjfx21.override { withWebKit = true; }; | ||
openjdk = openjdk21.override { | ||
enableJavaFX = true; | ||
inherit openjfx; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The JDK derivation was changed recently, and the override doesn't eval anymore.
inherit openjfx; | |
openjfx_jdk = openjfx; |
New package minion a MMO Addon manager for WOW and ESO from https://minion.mmoui.com/.
Close #142868
Adapted from @Vodurden, big thanks, and if you want to be credited somehow lmk.
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.