diff options
author | Rachel Powers <508861+Ryex@users.noreply.github.com> | 2023-07-02 19:32:25 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-02 19:32:25 -0700 |
commit | ca061080c13042642fb3bd49a29a863756f45866 (patch) | |
tree | a468b90c31ecb0cb5f2ca7885c2ecc7d4ab09570 /nix/package.nix | |
parent | 2680dba0aa74abefea58903dadad6578381101cb (diff) | |
parent | 3ad559ab22b6b20264eebb826efc4227374a64cc (diff) | |
download | PrismLauncher-ca061080c13042642fb3bd49a29a863756f45866.tar.gz PrismLauncher-ca061080c13042642fb3bd49a29a863756f45866.tar.bz2 PrismLauncher-ca061080c13042642fb3bd49a29a863756f45866.zip |
Merge pull request #2 from Trial97/feat/acknowledge_release_type
Feat/acknowledge release type
Diffstat (limited to 'nix/package.nix')
-rw-r--r-- | nix/package.nix | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/nix/package.nix b/nix/package.nix new file mode 100644 index 00000000..edc266dc --- /dev/null +++ b/nix/package.nix @@ -0,0 +1,65 @@ +{ + lib, + stdenv, + cmake, + ninja, + jdk17, + zlib, + qtbase, + quazip, + extra-cmake-modules, + tomlplusplus, + cmark, + ghc_filesystem, + gamemode, + msaClientID ? null, + gamemodeSupport ? true, + self, + version, + libnbtplusplus, +}: +stdenv.mkDerivation rec { + pname = "prismlauncher-unwrapped"; + inherit version; + + src = lib.cleanSource self; + + nativeBuildInputs = [extra-cmake-modules cmake jdk17 ninja]; + buildInputs = + [ + qtbase + zlib + quazip + ghc_filesystem + tomlplusplus + cmark + ] + ++ lib.optional gamemodeSupport gamemode; + + hardeningEnable = ["pie"]; + + cmakeFlags = + lib.optionals (msaClientID != null) ["-DLauncher_MSA_CLIENT_ID=${msaClientID}"] + ++ lib.optionals (lib.versionOlder qtbase.version "6") ["-DLauncher_QT_VERSION_MAJOR=5"]; + + postUnpack = '' + rm -rf source/libraries/libnbtplusplus + ln -s ${libnbtplusplus} source/libraries/libnbtplusplus + ''; + + dontWrapQtApps = true; + + 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]; + }; +} |