prismlauncher: 7.2 -> 8.0

Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>

+7 -73
-36
pkgs/games/prismlauncher/0001-launcher-translations-explicitly-convert-QVector-ite.patch
··· 1 - From c39637720109dd5d97750907c51e9c0fb8f43f0b Mon Sep 17 00:00:00 2001 2 - From: Nick Cao <nickcao@nichi.co> 3 - Date: Wed, 11 Oct 2023 22:51:23 -0400 4 - Subject: [PATCH] launcher/translations: explicitly convert QVector iterators 5 - to pointers 6 - 7 - --- 8 - launcher/translations/TranslationsModel.cpp | 5 ++--- 9 - 1 file changed, 2 insertions(+), 3 deletions(-) 10 - 11 - diff --git a/launcher/translations/TranslationsModel.cpp b/launcher/translations/TranslationsModel.cpp 12 - index 2763cca2..64c21dbd 100644 13 - --- a/launcher/translations/TranslationsModel.cpp 14 - +++ b/launcher/translations/TranslationsModel.cpp 15 - @@ -524,7 +524,7 @@ Language * TranslationsModel::findLanguage(const QString& key) 16 - } 17 - else 18 - { 19 - - return found; 20 - + return &(*found); 21 - } 22 - } 23 - 24 - @@ -655,8 +655,7 @@ QModelIndex TranslationsModel::selectedIndex() 25 - auto found = findLanguage(d->m_selectedLanguage); 26 - if(found) 27 - { 28 - - // QVector iterator freely converts to pointer to contained type 29 - - return index(found - d->m_languages.begin(), 0, QModelIndex()); 30 - + return index(found - &(*d->m_languages.begin()), 0, QModelIndex()); 31 - } 32 - return QModelIndex(); 33 - } 34 - -- 35 - 2.42.0 36 -
···
+7 -37
pkgs/games/prismlauncher/default.nix
··· 1 { lib 2 , stdenv 3 , fetchFromGitHub 4 - , fetchpatch 5 , canonicalize-jars-hook 6 , cmake 7 , cmark ··· 23 libnbtplusplus = fetchFromGitHub { 24 owner = "PrismLauncher"; 25 repo = "libnbtplusplus"; 26 - rev = "2203af7eeb48c45398139b583615134efd8d407f"; 27 - sha256 = "sha256-TvVOjkUobYJD9itQYueELJX3wmecvEdCbJ0FinW2mL4="; 28 }; 29 in 30 31 assert lib.assertMsg (stdenv.isLinux || !gamemodeSupport) "gamemodeSupport is only available on Linux"; 32 33 - stdenv.mkDerivation 34 - rec { 35 pname = "prismlauncher-unwrapped"; 36 - version = "7.2"; 37 38 src = fetchFromGitHub { 39 owner = "PrismLauncher"; 40 repo = "PrismLauncher"; 41 - rev = version; 42 - sha256 = "sha256-RArg60S91YKp1Mt97a5JNfBEOf2cmuX4pK3VAx2WfqM="; 43 }; 44 45 - patches = [ 46 - ./0001-launcher-translations-explicitly-convert-QVector-ite.patch 47 - ] ++ lib.optionals stdenv.isDarwin [ 48 - # https://github.com/PrismLauncher/PrismLauncher/pull/1452 49 - # These patches allow us to disable the Sparkle updater and cmake bundling 50 - # TODO: remove these when updating to 8.0 51 - (fetchpatch { 52 - name = "disable-sparkle-when-url-is-empty.patch"; 53 - url = "https://github.com/PrismLauncher/PrismLauncher/commit/48e50401968a72846350c6fbd76cc957b64a6b5a.patch"; 54 - hash = "sha256-IFxp6Sj87ogQcMooV4Ql5/4B+C7oTzEk+4tlMud2OLo="; 55 - }) 56 - (fetchpatch { 57 - name = "make-install_bundle-cached.patch"; 58 - url = "https://github.com/PrismLauncher/PrismLauncher/commit/a8498b0dab94d0ab6c9e5cf395e5003db541b749.patch"; 59 - hash = "sha256-ji5GGUnzVut9xFXkynqf9aVR9FO/zsqIbt3P9dexJ2I="; 60 - }) 61 - (fetchpatch { 62 - name = "dont-include-sparkle-when-not-enabled.patch"; 63 - url = "https://github.com/PrismLauncher/PrismLauncher/commit/51bfda937d47837ed426150ed6f43a60b4ca0ce1.patch"; 64 - hash = "sha256-7hMgANOg4zRIf3F2AfLXGR3dAEBqVmKm/J5SH0G5oCk="; 65 - }) 66 - (fetchpatch { 67 - name = "introduce-internal-updater-variable.patch"; 68 - url = "https://github.com/PrismLauncher/PrismLauncher/commit/b1aa9e584624a0732dd55fc6c459524a8abfe6ba.patch"; 69 - hash = "sha256-mm++EfnBxz7NVtKLMb889mMq8F/OdQmzob8OmlvNlRA="; 70 - }) 71 - ]; 72 - 73 nativeBuildInputs = [ extra-cmake-modules cmake jdk17 ninja canonicalize-jars-hook ]; 74 buildInputs = 75 [ ··· 113 license = licenses.gpl3Only; 114 maintainers = with maintainers; [ minion3665 Scrumplex getchoo ]; 115 }; 116 - }
··· 1 { lib 2 , stdenv 3 , fetchFromGitHub 4 , canonicalize-jars-hook 5 , cmake 6 , cmark ··· 22 libnbtplusplus = fetchFromGitHub { 23 owner = "PrismLauncher"; 24 repo = "libnbtplusplus"; 25 + rev = "a5e8fd52b8bf4ab5d5bcc042b2a247867589985f"; 26 + hash = "sha256-A5kTgICnx+Qdq3Fir/bKTfdTt/T1NQP2SC+nhN1ENug="; 27 }; 28 in 29 30 assert lib.assertMsg (stdenv.isLinux || !gamemodeSupport) "gamemodeSupport is only available on Linux"; 31 32 + stdenv.mkDerivation (finalAttrs: { 33 pname = "prismlauncher-unwrapped"; 34 + version = "8.0"; 35 36 src = fetchFromGitHub { 37 owner = "PrismLauncher"; 38 repo = "PrismLauncher"; 39 + rev = finalAttrs.version; 40 + hash = "sha256-WBajtfj3qAMq8zd2S53CQyHiyqtvffLOHOjmOpdALAA="; 41 }; 42 43 nativeBuildInputs = [ extra-cmake-modules cmake jdk17 ninja canonicalize-jars-hook ]; 44 buildInputs = 45 [ ··· 83 license = licenses.gpl3Only; 84 maintainers = with maintainers; [ minion3665 Scrumplex getchoo ]; 85 }; 86 + })