2023-05-27 23:15:28 +05:30
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
cmake,
|
|
|
|
ninja,
|
|
|
|
jdk17,
|
|
|
|
zlib,
|
|
|
|
qtbase,
|
|
|
|
quazip,
|
|
|
|
extra-cmake-modules,
|
|
|
|
tomlplusplus,
|
|
|
|
cmark,
|
2023-06-02 16:11:18 +05:30
|
|
|
ghc_filesystem,
|
2023-05-27 23:15:28 +05:30
|
|
|
gamemode,
|
2023-06-02 16:11:18 +05:30
|
|
|
msaClientID ? null,
|
|
|
|
gamemodeSupport ? true,
|
2023-05-27 23:15:28 +05:30
|
|
|
self,
|
|
|
|
version,
|
|
|
|
libnbtplusplus,
|
|
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
2023-06-02 16:11:18 +05:30
|
|
|
pname = "prismlauncher-unwrapped";
|
2023-05-27 23:15:28 +05:30
|
|
|
inherit version;
|
|
|
|
|
|
|
|
src = lib.cleanSource self;
|
|
|
|
|
2023-06-02 16:11:18 +05:30
|
|
|
nativeBuildInputs = [extra-cmake-modules cmake jdk17 ninja];
|
2023-05-27 23:15:28 +05:30
|
|
|
buildInputs =
|
|
|
|
[
|
|
|
|
qtbase
|
|
|
|
zlib
|
|
|
|
quazip
|
|
|
|
ghc_filesystem
|
|
|
|
tomlplusplus
|
|
|
|
cmark
|
|
|
|
]
|
2023-06-02 16:11:18 +05:30
|
|
|
++ lib.optional gamemodeSupport gamemode;
|
|
|
|
|
|
|
|
hardeningEnable = ["pie"];
|
2023-05-27 23:15:28 +05:30
|
|
|
|
|
|
|
cmakeFlags =
|
2023-06-02 16:11:18 +05:30
|
|
|
lib.optionals (msaClientID != null) ["-DLauncher_MSA_CLIENT_ID=${msaClientID}"]
|
2023-05-27 23:15:28 +05:30
|
|
|
++ lib.optionals (lib.versionOlder qtbase.version "6") ["-DLauncher_QT_VERSION_MAJOR=5"];
|
|
|
|
|
|
|
|
postUnpack = ''
|
|
|
|
rm -rf source/libraries/libnbtplusplus
|
2023-06-02 16:11:18 +05:30
|
|
|
ln -s ${libnbtplusplus} source/libraries/libnbtplusplus
|
2023-05-27 23:15:28 +05:30
|
|
|
'';
|
|
|
|
|
2023-06-02 16:11:18 +05:30
|
|
|
dontWrapQtApps = true;
|
2023-05-27 23:15:28 +05:30
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://prismlauncher.org/";
|
|
|
|
description = "A free, open source launcher for Minecraft";
|
|
|
|
longDescription = ''
|
|
|
|
Allows you to have multiple, separate instances of Minecraft (each with
|
|
|
|
their own mods, texture packs, saves, etc) and helps you manage them and
|
|
|
|
their associated options with a simple interface.
|
|
|
|
'';
|
|
|
|
platforms = platforms.linux;
|
|
|
|
changelog = "https://github.com/PrismLauncher/PrismLauncher/releases/tag/${version}";
|
|
|
|
license = licenses.gpl3Only;
|
|
|
|
maintainers = with maintainers; [minion3665 Scrumplex];
|
|
|
|
};
|
|
|
|
}
|