prismlauncher: fix darwin

Previously, `glfw-wayland-minecraft` would always be required and the
macOS application would be located at `<store entry>/PrismLauncher.app`,
while certain utilities (i.e. `home-manager`) expect it to be at
`<store entry>/Applications/PrismLauncher.app`
This commit is contained in:
Alice Carroll 2024-04-21 01:25:19 +03:00
parent f792ecf1bd
commit 117f86f9fa
No known key found for this signature in database
GPG Key ID: 05140B67902CD3AF
2 changed files with 6 additions and 2 deletions

View File

@ -60,7 +60,11 @@ stdenv.mkDerivation (finalAttrs: {
"-DLauncher_BUILD_PLATFORM=nixpkgs"
] ++ lib.optionals (msaClientID != null) [ "-DLauncher_MSA_CLIENT_ID=${msaClientID}" ]
++ lib.optionals (lib.versionOlder qtbase.version "6") [ "-DLauncher_QT_VERSION_MAJOR=5" ]
++ lib.optionals stdenv.isDarwin [ "-DINSTALL_BUNDLE=nodeps" "-DMACOSX_SPARKLE_UPDATE_FEED_URL=''" ];
++ lib.optionals stdenv.isDarwin [
"-DINSTALL_BUNDLE=nodeps"
"-DMACOSX_SPARKLE_UPDATE_FEED_URL=''"
"-DCMAKE_INSTALL_PREFIX=${placeholder "out"}/Applications/"
];
postUnpack = ''
rm -rf source/libraries/libnbtplusplus

View File

@ -70,7 +70,7 @@ symlinkJoin {
]
++ lib.optional (lib.versionAtLeast qtbase.version "6" && stdenv.isLinux) qtwayland;
waylandPreExec = ''
waylandPreExec = lib.optionalString withWaylandGLFW ''
if [ -n "$WAYLAND_DISPLAY" ]; then
export LD_LIBRARY_PATH=${lib.getLib glfw-wayland-minecraft}/lib:"$LD_LIBRARY_PATH"
fi