4 , canonicalize-jars-hook
18 , gamemodeSupport ? stdenv.isLinux
22 libnbtplusplus = fetchFromGitHub {
23 owner = "PrismLauncher";
24 repo = "libnbtplusplus";
25 rev = "a5e8fd52b8bf4ab5d5bcc042b2a247867589985f";
26 hash = "sha256-A5kTgICnx+Qdq3Fir/bKTfdTt/T1NQP2SC+nhN1ENug=";
30 assert lib.assertMsg (stdenv.isLinux || !gamemodeSupport) "gamemodeSupport is only available on Linux";
32 stdenv.mkDerivation (finalAttrs: {
33 pname = "prismlauncher-unwrapped";
36 src = fetchFromGitHub {
37 owner = "PrismLauncher";
38 repo = "PrismLauncher";
39 rev = finalAttrs.version;
40 hash = "sha256-WBajtfj3qAMq8zd2S53CQyHiyqtvffLOHOjmOpdALAA=";
43 nativeBuildInputs = [ extra-cmake-modules cmake jdk17 ninja canonicalize-jars-hook ];
53 ++ lib.optional gamemodeSupport gamemode
54 ++ lib.optionals stdenv.isDarwin [ Cocoa ];
56 hardeningEnable = lib.optionals stdenv.isLinux [ "pie" ];
60 "-DLauncher_BUILD_PLATFORM=nixpkgs"
61 ] ++ lib.optionals (msaClientID != null) [ "-DLauncher_MSA_CLIENT_ID=${msaClientID}" ]
62 ++ lib.optionals (lib.versionOlder qtbase.version "6") [ "-DLauncher_QT_VERSION_MAJOR=5" ]
63 ++ lib.optionals stdenv.isDarwin [ "-DINSTALL_BUNDLE=nodeps" "-DMACOSX_SPARKLE_UPDATE_FEED_URL=''" ];
66 rm -rf source/libraries/libnbtplusplus
67 ln -s ${libnbtplusplus} source/libraries/libnbtplusplus
70 dontWrapQtApps = true;
73 mainProgram = "prismlauncher";
74 homepage = "https://prismlauncher.org/";
75 description = "A free, open source launcher for Minecraft";
77 Allows you to have multiple, separate instances of Minecraft (each with
78 their own mods, texture packs, saves, etc) and helps you manage them and
79 their associated options with a simple interface.
81 platforms = with platforms; linux ++ darwin;
82 changelog = "https://github.com/PrismLauncher/PrismLauncher/releases/tag/${version}";
83 license = licenses.gpl3Only;
84 maintainers = with maintainers; [ minion3665 Scrumplex getchoo ];