mcaselector: add missing wrapGAppsHook (#280536)

* mcaselector: add wrapGAppsHook

* mcaselector: don't wrap executable twice

* mcaselector: correctly escape bash variable

---------

Co-authored-by: Aleksana <alexander.huang.y@gmail.com>
This commit is contained in:
Leix b 2024-04-24 16:17:07 +02:00 committed by GitHub
parent 8e141b8da1
commit f965023df8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2,6 +2,7 @@
, stdenvNoCC
, fetchurl
, makeWrapper
, wrapGAppsHook
, jre
}:
@ -17,7 +18,9 @@ stdenvNoCC.mkDerivation (finalAttrs: {
dontUnpack = true;
dontBuild = true;
nativeBuildInputs = [ jre makeWrapper ];
nativeBuildInputs = [ jre makeWrapper wrapGAppsHook ];
dontWrapGApps = true;
installPhase = ''
runHook preInstall
@ -25,7 +28,8 @@ stdenvNoCC.mkDerivation (finalAttrs: {
mkdir -p $out/{bin,lib/mcaselector}
cp $src $out/lib/mcaselector/mcaselector.jar
makeWrapper ${jre}/bin/java $out/bin/mcaselector \
--add-flags "-jar $out/lib/mcaselector/mcaselector.jar"
--add-flags "-jar $out/lib/mcaselector/mcaselector.jar" \
''${gappsWrapperArgs[@]}
runHook postInstall
'';