15 stripJavaArchivesHook,
20 gamemodeSupport ? stdenv.hostPlatform.isLinux,
24 libnbtplusplus = fetchFromGitHub {
25 owner = "PrismLauncher";
26 repo = "libnbtplusplus";
27 rev = "23b955121b8217c1c348a9ed2483167a6f3ff4ad";
28 hash = "sha256-yy0q+bky80LtK1GWzz7qpM+aAGrOqLuewbid8WT1ilk=";
32 assert lib.assertMsg (
33 gamemodeSupport -> stdenv.hostPlatform.isLinux
34 ) "gamemodeSupport is only available on Linux.";
36 stdenv.mkDerivation (finalAttrs: {
37 pname = "prismlauncher-unwrapped";
40 src = fetchFromGitHub {
41 owner = "PrismLauncher";
42 repo = "PrismLauncher";
43 rev = "refs/tags/${finalAttrs.version}";
44 hash = "sha256-LVrWFBsI4+BOY5hlevfzqfRXQM6AFd5bMnXbBqTrxzA=";
48 rm -rf source/libraries/libnbtplusplus
49 ln -s ${libnbtplusplus} source/libraries/libnbtplusplus
65 kdePackages.qtnetworkauth
70 ++ lib.optionals stdenv.hostPlatform.isDarwin [ apple-sdk_11 ]
71 ++ lib.optional gamemodeSupport gamemode;
73 hardeningEnable = lib.optionals stdenv.hostPlatform.isLinux [ "pie" ];
78 (lib.cmakeFeature "Launcher_BUILD_PLATFORM" "nixpkgs")
80 ++ lib.optionals (msaClientID != null) [
81 (lib.cmakeFeature "Launcher_MSA_CLIENT_ID" (toString msaClientID))
83 ++ lib.optionals (lib.versionOlder kdePackages.qtbase.version "6") [
84 (lib.cmakeFeature "Launcher_QT_VERSION_MAJOR" "5")
86 ++ lib.optionals stdenv.hostPlatform.isDarwin [
87 # we wrap our binary manually
88 (lib.cmakeFeature "INSTALL_BUNDLE" "nodeps")
89 # disable built-in updater
90 (lib.cmakeFeature "MACOSX_SPARKLE_UPDATE_FEED_URL" "''")
91 (lib.cmakeFeature "CMAKE_INSTALL_PREFIX" "${placeholder "out"}/Applications/")
96 dontWrapQtApps = true;
99 updateScript = nix-update-script { };
103 description = "Free, open source launcher for Minecraft";
105 Allows you to have multiple, separate instances of Minecraft (each with
106 their own mods, texture packs, saves, etc) and helps you manage them and
107 their associated options with a simple interface.
109 homepage = "https://prismlauncher.org/";
110 changelog = "https://github.com/PrismLauncher/PrismLauncher/releases/tag/${finalAttrs.version}";
111 license = lib.licenses.gpl3Only;
112 maintainers = with lib.maintainers; [
117 mainProgram = "prismlauncher";
118 platforms = lib.platforms.linux ++ lib.platforms.darwin;