15 stripJavaArchivesHook,
20 gamemodeSupport ? stdenv.hostPlatform.isLinux,
24 libnbtplusplus = fetchFromGitHub {
25 owner = "PrismLauncher";
26 repo = "libnbtplusplus";
27 rev = "a5e8fd52b8bf4ab5d5bcc042b2a247867589985f";
28 hash = "sha256-A5kTgICnx+Qdq3Fir/bKTfdTt/T1NQP2SC+nhN1ENug=";
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 = finalAttrs.version;
44 hash = "sha256-460hB91M2hZm+uU1tywJEj20oRd5cz/NDvya8/vJdSA=";
48 rm -rf source/libraries/libnbtplusplus
49 ln -s ${libnbtplusplus} source/libraries/libnbtplusplus
69 ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Cocoa ]
70 ++ lib.optional gamemodeSupport gamemode;
72 hardeningEnable = lib.optionals stdenv.hostPlatform.isLinux [ "pie" ];
77 (lib.cmakeFeature "Launcher_BUILD_PLATFORM" "nixpkgs")
79 ++ lib.optionals (msaClientID != null) [
80 (lib.cmakeFeature "Launcher_MSA_CLIENT_ID" (toString msaClientID))
82 ++ lib.optionals (lib.versionOlder kdePackages.qtbase.version "6") [
83 (lib.cmakeFeature "Launcher_QT_VERSION_MAJOR" "5")
85 ++ lib.optionals stdenv.hostPlatform.isDarwin [
86 # we wrap our binary manually
87 (lib.cmakeFeature "INSTALL_BUNDLE" "nodeps")
88 # disable built-in updater
89 (lib.cmakeFeature "MACOSX_SPARKLE_UPDATE_FEED_URL" "''")
90 (lib.cmakeFeature "CMAKE_INSTALL_PREFIX" "${placeholder "out"}/Applications/")
93 dontWrapQtApps = true;
96 updateScript = nix-update-script { };
100 description = "Free, open source launcher for Minecraft";
102 Allows you to have multiple, separate instances of Minecraft (each with
103 their own mods, texture packs, saves, etc) and helps you manage them and
104 their associated options with a simple interface.
106 homepage = "https://prismlauncher.org/";
107 changelog = "https://github.com/PrismLauncher/PrismLauncher/releases/tag/${finalAttrs.src.rev}";
108 license = lib.licenses.gpl3Only;
109 maintainers = with lib.maintainers; [
114 mainProgram = "prismlauncher";
115 platforms = lib.platforms.linux ++ lib.platforms.darwin;