From ed3e064d3b767300e54154ce1f971bba7bdd321d Mon Sep 17 00:00:00 2001 From: HackerNCoder Date: Mon, 27 Jan 2025 13:59:43 +0100 Subject: [PATCH 1/2] megasync: 5.6.1.0 -> 5.7.1.0 --- pkgs/applications/misc/megasync/default.nix | 11 ++++++----- .../megasync/megasync-disable-isolated-gfx.patch | 13 +++++++++++++ .../megasync-fix-cmake-install-bindir.patch | 8 ++++---- 3 files changed, 23 insertions(+), 9 deletions(-) create mode 100644 pkgs/applications/misc/megasync/megasync-disable-isolated-gfx.patch diff --git a/pkgs/applications/misc/megasync/default.nix b/pkgs/applications/misc/megasync/default.nix index 8ac1a9099e37..a5e02c460e43 100644 --- a/pkgs/applications/misc/megasync/default.nix +++ b/pkgs/applications/misc/megasync/default.nix @@ -37,13 +37,13 @@ }: mkDerivation rec { pname = "megasync"; - version = "5.6.1.0"; + version = "5.7.1.0"; src = fetchFromGitHub rec { owner = "meganz"; repo = "MEGAsync"; rev = "v${version}_Linux"; - hash = "sha256-EjXmx+beYH3J60RidkEbZHFS5ZAOpJKmNC+WCIM84RA="; + hash = "sha256-lbAI17CyHrppMnxQDV5g0IE+I7Y0DwU+h5MSFZclD2A="; fetchSubmodules = false; # DesignTokensImporter cannot be fetched, see #1010 in github:meganz/megasync leaveDotGit = true; postFetch = '' @@ -94,16 +94,17 @@ mkDerivation rec { patches = [ (fetchpatch { - url = "https://aur.archlinux.org/cgit/aur.git/plain/020-megasync-sdk-fix-cmake-dependencies-detection.patch?h=megasync&id=4b1eca5bc0d75709dee3a1260264d1b6386d3398"; - hash = "sha256-y3WhLkawFzQRzzRBpioiyAT3F1NDQvYBOm2888g5V5c="; + url = "https://aur.archlinux.org/cgit/aur.git/plain/020-megasync-sdk-fix-cmake-dependencies-detection.patch?h=megasync&id=ff59780039697591e7e3a966db058b23bee0451c"; + hash = "sha256-hQY6tMwiV3B6M6WiFdOESdhahAtuWjdoj2eI2mst/K8="; extraPrefix = "src/MEGASync/mega/"; stripLen = true; }) (fetchpatch { - url = "https://aur.archlinux.org/cgit/aur.git/plain/030-megasync-app-fix-cmake-dependencies-detection.patch?h=megasync&id=4b1eca5bc0d75709dee3a1260264d1b6386d3398"; + url = "https://aur.archlinux.org/cgit/aur.git/plain/030-megasync-app-fix-cmake-dependencies-detection.patch?h=megasync&id=ff59780039697591e7e3a966db058b23bee0451c"; hash = "sha256-11XWctv1veUEguc9Xvz2hMYw26CaCwu6M4hyA+5r81U="; }) ./megasync-fix-cmake-install-bindir.patch + ./megasync-disable-isolated-gfx.patch # it requires freeimage. Did not work when set as cmakeFlag ./dont-fetch-clang-format.patch ]; diff --git a/pkgs/applications/misc/megasync/megasync-disable-isolated-gfx.patch b/pkgs/applications/misc/megasync/megasync-disable-isolated-gfx.patch new file mode 100644 index 000000000000..a92451301a0e --- /dev/null +++ b/pkgs/applications/misc/megasync/megasync-disable-isolated-gfx.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/modules/desktopapp_options.cmake b/cmake/modules/desktopapp_options.cmake +index cedbe6ed4..bc8f47494 100644 +--- a/cmake/modules/desktopapp_options.cmake ++++ b/cmake/modules/desktopapp_options.cmake +@@ -27,7 +27,7 @@ if (ENABLE_DESKTOP_APP) + set(USE_LIBUV ON) # Used by the Qt Desktop App: Includes the library and turns on internal web and ftp server functionality in the SDK. + set(ENABLE_LOG_PERFORMANCE ON) + set(ENABLE_QT_BINDINGS ON) +- set(ENABLE_ISOLATED_GFX ON) ++ set(ENABLE_ISOLATED_GFX OFF) + endif() + + include(sdklib_options) diff --git a/pkgs/applications/misc/megasync/megasync-fix-cmake-install-bindir.patch b/pkgs/applications/misc/megasync/megasync-fix-cmake-install-bindir.patch index 8e15acf60e8f..f1ddab95afbf 100644 --- a/pkgs/applications/misc/megasync/megasync-fix-cmake-install-bindir.patch +++ b/pkgs/applications/misc/megasync/megasync-fix-cmake-install-bindir.patch @@ -1,7 +1,7 @@ -diff --git a/contrib/cmake/modules/desktopapp_configuration.cmake b/contrib/cmake/modules/desktopapp_configuration.cmake -index 8e9f35cb2..b62f5a9b5 100644 ---- a/contrib/cmake/modules/desktopapp_configuration.cmake -+++ b/contrib/cmake/modules/desktopapp_configuration.cmake +diff --git a/cmake/modules/desktopapp_configuration.cmake b/cmake/modules/desktopapp_configuration.cmake +index a14ac8669..e80c5e9f6 100644 +--- a/cmake/modules/desktopapp_configuration.cmake ++++ b/cmake/modules/desktopapp_configuration.cmake @@ -30,7 +30,6 @@ if(UNIX AND NOT APPLE) # Used for building packages: in which install dir is a path construction folder that will not be there in packages From 6686f92e1a988e25379e6a575a228c1106e497b0 Mon Sep 17 00:00:00 2001 From: HackerNCoder Date: Thu, 6 Mar 2025 17:13:28 +0100 Subject: [PATCH 2/2] megasync: Use substituteInPlace instead of patch for ISOLATED_GFX --- pkgs/applications/misc/megasync/default.nix | 2 +- .../megasync/megasync-disable-isolated-gfx.patch | 13 ------------- 2 files changed, 1 insertion(+), 14 deletions(-) delete mode 100644 pkgs/applications/misc/megasync/megasync-disable-isolated-gfx.patch diff --git a/pkgs/applications/misc/megasync/default.nix b/pkgs/applications/misc/megasync/default.nix index a5e02c460e43..d04ef8ad66e7 100644 --- a/pkgs/applications/misc/megasync/default.nix +++ b/pkgs/applications/misc/megasync/default.nix @@ -104,11 +104,11 @@ mkDerivation rec { hash = "sha256-11XWctv1veUEguc9Xvz2hMYw26CaCwu6M4hyA+5r81U="; }) ./megasync-fix-cmake-install-bindir.patch - ./megasync-disable-isolated-gfx.patch # it requires freeimage. Did not work when set as cmakeFlag ./dont-fetch-clang-format.patch ]; postPatch = '' + substituteInPlace cmake/modules/desktopapp_options.cmake --replace-fail "ENABLE_ISOLATED_GFX ON" "ENABLE_ISOLATED_GFX OFF" for file in $(find src/ -type f \( -iname configure -o -iname \*.sh \) ); do substituteInPlace "$file" --replace "/bin/bash" "${stdenv.shell}" done diff --git a/pkgs/applications/misc/megasync/megasync-disable-isolated-gfx.patch b/pkgs/applications/misc/megasync/megasync-disable-isolated-gfx.patch deleted file mode 100644 index a92451301a0e..000000000000 --- a/pkgs/applications/misc/megasync/megasync-disable-isolated-gfx.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/cmake/modules/desktopapp_options.cmake b/cmake/modules/desktopapp_options.cmake -index cedbe6ed4..bc8f47494 100644 ---- a/cmake/modules/desktopapp_options.cmake -+++ b/cmake/modules/desktopapp_options.cmake -@@ -27,7 +27,7 @@ if (ENABLE_DESKTOP_APP) - set(USE_LIBUV ON) # Used by the Qt Desktop App: Includes the library and turns on internal web and ftp server functionality in the SDK. - set(ENABLE_LOG_PERFORMANCE ON) - set(ENABLE_QT_BINDINGS ON) -- set(ENABLE_ISOLATED_GFX ON) -+ set(ENABLE_ISOLATED_GFX OFF) - endif() - - include(sdklib_options)