From 117f86f9fa6d01d1041ed9186ecbdcad9e42d57f Mon Sep 17 00:00:00 2001 From: Alice Carroll Date: Sun, 21 Apr 2024 01:25:19 +0300 Subject: [PATCH] prismlauncher: fix darwin Previously, `glfw-wayland-minecraft` would always be required and the macOS application would be located at `/PrismLauncher.app`, while certain utilities (i.e. `home-manager`) expect it to be at `/Applications/PrismLauncher.app` --- pkgs/games/prismlauncher/default.nix | 6 +++++- pkgs/games/prismlauncher/wrapper.nix | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/games/prismlauncher/default.nix b/pkgs/games/prismlauncher/default.nix index 058516cdc9c6..cb9cb14a7415 100644 --- a/pkgs/games/prismlauncher/default.nix +++ b/pkgs/games/prismlauncher/default.nix @@ -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 diff --git a/pkgs/games/prismlauncher/wrapper.nix b/pkgs/games/prismlauncher/wrapper.nix index dafe7276af88..260b08caeca3 100644 --- a/pkgs/games/prismlauncher/wrapper.nix +++ b/pkgs/games/prismlauncher/wrapper.nix @@ -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