From 8827e34ad5c24104123c3a67bc26af3ff11d651e Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Wed, 3 Jul 2024 02:10:43 +0200 Subject: [PATCH 1/4] dolphin-emu: 5.0-21460 -> 2407 Diff: https://github.com/dolphin-emu/dolphin/compare/a9544510468740b77cf06ef28daaa65fe247fd32...b92e354389bb7c0bd114a8631b8af110d3cb3a14 Announcement: https://dolphin-emu.org/blog/2024/07/02/dolphin-releases-announcement/ --- .../emulators/dolphin-emu/default.nix | 15 +++++---------- .../emulators/dolphin-emu/find-minizip-ng.patch | 13 ------------- 2 files changed, 5 insertions(+), 23 deletions(-) delete mode 100644 pkgs/applications/emulators/dolphin-emu/find-minizip-ng.patch diff --git a/pkgs/applications/emulators/dolphin-emu/default.nix b/pkgs/applications/emulators/dolphin-emu/default.nix index 100ea1d3f953..1720e5f2d8da 100644 --- a/pkgs/applications/emulators/dolphin-emu/default.nix +++ b/pkgs/applications/emulators/dolphin-emu/default.nix @@ -58,21 +58,16 @@ stdenv.mkDerivation rec { pname = "dolphin-emu"; - version = "5.0-21460"; + version = "2407"; src = fetchFromGitHub { owner = "dolphin-emu"; repo = "dolphin"; - rev = "a9544510468740b77cf06ef28daaa65fe247fd32"; - hash = "sha256-mhD7Uaqi8GzHdR7Y81TspvCnrZH2evWuWFgXMQ2c8g0="; + rev = "b92e354389bb7c0bd114a8631b8af110d3cb3a14"; + hash = "sha256-8W4KyIj+rhDkWnQogjpzlEJVo3HJenfpWKimSyMGN7c="; fetchSubmodules = true; }; - patches = [ - # TODO: Remove when merged https://github.com/dolphin-emu/dolphin/pull/12736 - ./find-minizip-ng.patch - ]; - strictDeps = true; nativeBuildInputs = [ @@ -167,11 +162,11 @@ stdenv.mkDerivation rec { tests.version = testers.testVersion { package = dolphin-emu; command = "dolphin-emu-nogui --version"; - version = if stdenv.hostPlatform.isDarwin then "Dolphin 5.0" else version; + inherit version; }; updateScript = writeShellScript "dolphin-update-script" '' - set -eou pipefail + set -euo pipefail export PATH=${lib.makeBinPath [ curl jq common-updater-scripts ]} json="$(curl -s https://dolphin-emu.org/update/latest/beta)" diff --git a/pkgs/applications/emulators/dolphin-emu/find-minizip-ng.patch b/pkgs/applications/emulators/dolphin-emu/find-minizip-ng.patch deleted file mode 100644 index b8a6d81aed55..000000000000 --- a/pkgs/applications/emulators/dolphin-emu/find-minizip-ng.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index fb37788513..289a25fa57 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -676,7 +676,7 @@ dolphin_find_optional_system_library_pkgconfig(ZLIB zlib-ng ZLIB::ZLIB Externals - - # https://github.com/zlib-ng/minizip-ng/commit/6c5f265a55f1a12a7a016cd2962feff91cff5d2e - add_definitions(-DMZ_COMPAT_VERSION=110) # This macro is for forwards compatibility with 4.0.4+ --dolphin_find_optional_system_library_pkgconfig(MINIZIP minizip>=3.0.0 minizip::minizip Externals/minizip) -+dolphin_find_optional_system_library_pkgconfig(MINIZIP minizip-ng>=3.0.0 minizip::minizip Externals/minizip) - - dolphin_find_optional_system_library(LZO Externals/LZO) - From 535d620734b51291b567b7b7bc16414c7cdda457 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Wed, 3 Jul 2024 03:07:07 +0200 Subject: [PATCH 2/4] dolphin-emu: add maintainer pbsds --- pkgs/applications/emulators/dolphin-emu/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/emulators/dolphin-emu/default.nix b/pkgs/applications/emulators/dolphin-emu/default.nix index 1720e5f2d8da..e2d238459861 100644 --- a/pkgs/applications/emulators/dolphin-emu/default.nix +++ b/pkgs/applications/emulators/dolphin-emu/default.nix @@ -183,6 +183,6 @@ stdenv.mkDerivation rec { branch = "master"; license = licenses.gpl2Plus; platforms = platforms.unix; - maintainers = with maintainers; [ ]; + maintainers = with maintainers; [ pbsds ]; }; } From f72b199c40ce07b00f26d99227a70b64b77acc87 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Thu, 4 Jul 2024 02:47:57 +0200 Subject: [PATCH 3/4] dolphin-emu: switch to git release tags --- .../emulators/dolphin-emu/default.nix | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/pkgs/applications/emulators/dolphin-emu/default.nix b/pkgs/applications/emulators/dolphin-emu/default.nix index e2d238459861..d3547266651f 100644 --- a/pkgs/applications/emulators/dolphin-emu/default.nix +++ b/pkgs/applications/emulators/dolphin-emu/default.nix @@ -40,11 +40,8 @@ , xz # Used in passthru -, common-updater-scripts , dolphin-emu -, jq , testers -, writeShellScript # Darwin-only dependencies , CoreBluetooth @@ -63,7 +60,7 @@ stdenv.mkDerivation rec { src = fetchFromGitHub { owner = "dolphin-emu"; repo = "dolphin"; - rev = "b92e354389bb7c0bd114a8631b8af110d3cb3a14"; + rev = "refs/tags/${version}"; hash = "sha256-8W4KyIj+rhDkWnQogjpzlEJVo3HJenfpWKimSyMGN7c="; fetchSubmodules = true; }; @@ -164,16 +161,6 @@ stdenv.mkDerivation rec { command = "dolphin-emu-nogui --version"; inherit version; }; - - updateScript = writeShellScript "dolphin-update-script" '' - set -euo pipefail - export PATH=${lib.makeBinPath [ curl jq common-updater-scripts ]} - - json="$(curl -s https://dolphin-emu.org/update/latest/beta)" - version="$(jq -r '.shortrev' <<< "$json")" - rev="$(jq -r '.hash' <<< "$json")" - update-source-version dolphin-emu "$version" --rev="$rev" - ''; }; meta = with lib; { From 67ed3e456887e17f0a631fe4443d705c858634c5 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Thu, 4 Jul 2024 02:54:01 +0200 Subject: [PATCH 4/4] dolphin-emu: refactor to finalAttrs pattern --- .../emulators/dolphin-emu/default.nix | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/pkgs/applications/emulators/dolphin-emu/default.nix b/pkgs/applications/emulators/dolphin-emu/default.nix index d3547266651f..3ba6288a9887 100644 --- a/pkgs/applications/emulators/dolphin-emu/default.nix +++ b/pkgs/applications/emulators/dolphin-emu/default.nix @@ -40,7 +40,6 @@ , xz # Used in passthru -, dolphin-emu , testers # Darwin-only dependencies @@ -53,14 +52,14 @@ , VideoToolbox }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "dolphin-emu"; version = "2407"; src = fetchFromGitHub { owner = "dolphin-emu"; repo = "dolphin"; - rev = "refs/tags/${version}"; + rev = "refs/tags/${finalAttrs.version}"; hash = "sha256-8W4KyIj+rhDkWnQogjpzlEJVo3HJenfpWKimSyMGN7c="; fetchSubmodules = true; }; @@ -125,8 +124,8 @@ stdenv.mkDerivation rec { cmakeFlags = [ "-DDISTRIBUTOR=NixOS" - "-DDOLPHIN_WC_REVISION=${src.rev}" - "-DDOLPHIN_WC_DESCRIBE=${version}" + "-DDOLPHIN_WC_REVISION=${finalAttrs.src.rev}" + "-DDOLPHIN_WC_DESCRIBE=${finalAttrs.version}" "-DDOLPHIN_WC_BRANCH=master" ] ++ lib.optionals stdenv.isDarwin [ "-DOSX_USE_DEFAULT_SEARCH_PATH=True" @@ -157,9 +156,9 @@ stdenv.mkDerivation rec { passthru = { tests.version = testers.testVersion { - package = dolphin-emu; + package = finalAttrs.finalPackage; command = "dolphin-emu-nogui --version"; - inherit version; + inherit (finalAttrs) version; }; }; @@ -172,4 +171,4 @@ stdenv.mkDerivation rec { platforms = platforms.unix; maintainers = with maintainers; [ pbsds ]; }; -} +})