prismlauncher: target final wrapper in instance shortcuts (#537642)
This commit is contained in:
@@ -42,6 +42,12 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
ln -s ${libnbtplusplus} source/libraries/libnbtplusplus
|
||||
'';
|
||||
|
||||
# Ensure that instance shortucts point to our final wrapper, rather than this unwrapped version
|
||||
postPatch = ''
|
||||
substituteInPlace launcher/minecraft/ShortcutUtils.cpp \
|
||||
--replace-fail 'QApplication::applicationFilePath()' 'QProcessEnvironment::systemEnvironment().value("NIX_LAUNCHER_WRAPPER", "${placeholder "out"}/bin/prismlauncher")'
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
pkg-config
|
||||
|
||||
@@ -122,7 +122,10 @@ symlinkJoin {
|
||||
++ additionalPrograms;
|
||||
|
||||
in
|
||||
[ "--prefix PRISMLAUNCHER_JAVA_PATHS : ${lib.makeSearchPath "bin/java" jdks}" ]
|
||||
[
|
||||
"--set NIX_LAUNCHER_WRAPPER ${placeholder "out"}/bin/prismlauncher"
|
||||
"--prefix PRISMLAUNCHER_JAVA_PATHS : ${lib.makeSearchPath "bin/java" jdks}"
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isLinux [
|
||||
"--set LD_LIBRARY_PATH ${addDriverRunpath.driverLink}/lib:${lib.makeLibraryPath runtimeLibs}"
|
||||
"--prefix PATH : ${lib.makeBinPath runtimePrograms}"
|
||||
|
||||
Reference in New Issue
Block a user