about summary refs log tree commit diff
path: root/pkgs/games/prismlauncher
diff options
context:
space:
mode:
authorSefa Eyeoglu <contact@scrumplex.net>2023-11-07 20:45:10 +0100
committerSefa Eyeoglu <contact@scrumplex.net>2023-11-07 20:45:10 +0100
commit8cda15836d00638ce735913f68f290fcbaada5b6 (patch)
treed62739715c82e351c81c2126ca6ec70a46369ea7 /pkgs/games/prismlauncher
parent1dab6eb2eaadb7ea5c335fe18aa7d35b1d72e472 (diff)
prismlauncher: 7.2 -> 8.0
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
Diffstat (limited to 'pkgs/games/prismlauncher')
-rw-r--r--pkgs/games/prismlauncher/0001-launcher-translations-explicitly-convert-QVector-ite.patch36
-rw-r--r--pkgs/games/prismlauncher/default.nix44
2 files changed, 7 insertions, 73 deletions
diff --git a/pkgs/games/prismlauncher/0001-launcher-translations-explicitly-convert-QVector-ite.patch b/pkgs/games/prismlauncher/0001-launcher-translations-explicitly-convert-QVector-ite.patch
deleted file mode 100644
index c1e4731d01486..0000000000000
--- a/pkgs/games/prismlauncher/0001-launcher-translations-explicitly-convert-QVector-ite.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From c39637720109dd5d97750907c51e9c0fb8f43f0b Mon Sep 17 00:00:00 2001
-From: Nick Cao <nickcao@nichi.co>
-Date: Wed, 11 Oct 2023 22:51:23 -0400
-Subject: [PATCH] launcher/translations: explicitly convert QVector iterators
- to pointers
-
----
- launcher/translations/TranslationsModel.cpp | 5 ++---
- 1 file changed, 2 insertions(+), 3 deletions(-)
-
-diff --git a/launcher/translations/TranslationsModel.cpp b/launcher/translations/TranslationsModel.cpp
-index 2763cca2..64c21dbd 100644
---- a/launcher/translations/TranslationsModel.cpp
-+++ b/launcher/translations/TranslationsModel.cpp
-@@ -524,7 +524,7 @@ Language * TranslationsModel::findLanguage(const QString& key)
-     }
-     else
-     {
--        return found;
-+        return &(*found);
-     }
- }
- 
-@@ -655,8 +655,7 @@ QModelIndex TranslationsModel::selectedIndex()
-     auto found = findLanguage(d->m_selectedLanguage);
-     if(found)
-     {
--        // QVector iterator freely converts to pointer to contained type
--        return index(found - d->m_languages.begin(), 0, QModelIndex());
-+        return index(found - &(*d->m_languages.begin()), 0, QModelIndex());
-     }
-     return QModelIndex();
- }
--- 
-2.42.0
-
diff --git a/pkgs/games/prismlauncher/default.nix b/pkgs/games/prismlauncher/default.nix
index 2347c8b53ee71..2409794cdfdcb 100644
--- a/pkgs/games/prismlauncher/default.nix
+++ b/pkgs/games/prismlauncher/default.nix
@@ -1,7 +1,6 @@
 { lib
 , stdenv
 , fetchFromGitHub
-, fetchpatch
 , canonicalize-jars-hook
 , cmake
 , cmark
@@ -23,53 +22,24 @@ let
   libnbtplusplus = fetchFromGitHub {
     owner = "PrismLauncher";
     repo = "libnbtplusplus";
-    rev = "2203af7eeb48c45398139b583615134efd8d407f";
-    sha256 = "sha256-TvVOjkUobYJD9itQYueELJX3wmecvEdCbJ0FinW2mL4=";
+    rev = "a5e8fd52b8bf4ab5d5bcc042b2a247867589985f";
+    hash = "sha256-A5kTgICnx+Qdq3Fir/bKTfdTt/T1NQP2SC+nhN1ENug=";
   };
 in
 
 assert lib.assertMsg (stdenv.isLinux || !gamemodeSupport) "gamemodeSupport is only available on Linux";
 
-stdenv.mkDerivation
-rec {
+stdenv.mkDerivation (finalAttrs: {
   pname = "prismlauncher-unwrapped";
-  version = "7.2";
+  version = "8.0";
 
   src = fetchFromGitHub {
     owner = "PrismLauncher";
     repo = "PrismLauncher";
-    rev = version;
-    sha256 = "sha256-RArg60S91YKp1Mt97a5JNfBEOf2cmuX4pK3VAx2WfqM=";
+    rev = finalAttrs.version;
+    hash = "sha256-WBajtfj3qAMq8zd2S53CQyHiyqtvffLOHOjmOpdALAA=";
   };
 
-  patches = [
-    ./0001-launcher-translations-explicitly-convert-QVector-ite.patch
-  ] ++ lib.optionals stdenv.isDarwin [
-    # https://github.com/PrismLauncher/PrismLauncher/pull/1452
-    # These patches allow us to disable the Sparkle updater and cmake bundling
-    # TODO: remove these when updating to 8.0
-    (fetchpatch {
-      name = "disable-sparkle-when-url-is-empty.patch";
-      url = "https://github.com/PrismLauncher/PrismLauncher/commit/48e50401968a72846350c6fbd76cc957b64a6b5a.patch";
-      hash = "sha256-IFxp6Sj87ogQcMooV4Ql5/4B+C7oTzEk+4tlMud2OLo=";
-    })
-    (fetchpatch {
-      name = "make-install_bundle-cached.patch";
-      url = "https://github.com/PrismLauncher/PrismLauncher/commit/a8498b0dab94d0ab6c9e5cf395e5003db541b749.patch";
-      hash = "sha256-ji5GGUnzVut9xFXkynqf9aVR9FO/zsqIbt3P9dexJ2I=";
-    })
-    (fetchpatch {
-      name = "dont-include-sparkle-when-not-enabled.patch";
-      url = "https://github.com/PrismLauncher/PrismLauncher/commit/51bfda937d47837ed426150ed6f43a60b4ca0ce1.patch";
-      hash = "sha256-7hMgANOg4zRIf3F2AfLXGR3dAEBqVmKm/J5SH0G5oCk=";
-    })
-    (fetchpatch {
-      name = "introduce-internal-updater-variable.patch";
-      url = "https://github.com/PrismLauncher/PrismLauncher/commit/b1aa9e584624a0732dd55fc6c459524a8abfe6ba.patch";
-      hash = "sha256-mm++EfnBxz7NVtKLMb889mMq8F/OdQmzob8OmlvNlRA=";
-    })
-  ];
-
   nativeBuildInputs = [ extra-cmake-modules cmake jdk17 ninja canonicalize-jars-hook ];
   buildInputs =
     [
@@ -113,4 +83,4 @@ rec {
     license = licenses.gpl3Only;
     maintainers = with maintainers; [ minion3665 Scrumplex getchoo ];
   };
-}
+})