diff --git a/pkgs/applications/misc/megasync/020-megasync-sdk-fix-cmake-dependencies-detection.patch b/pkgs/applications/misc/megasync/020-megasync-sdk-fix-cmake-dependencies-detection.patch deleted file mode 100644 index ce0d9d10b56c..000000000000 --- a/pkgs/applications/misc/megasync/020-megasync-sdk-fix-cmake-dependencies-detection.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/src/MEGASync/mega/contrib/cmake/modules/sdklib_libraries.cmake -+++ b/src/MEGASync/mega/contrib/cmake/modules/sdklib_libraries.cmake -@@ -95,7 +95,7 @@ macro(load_sdklib_libraries) - - find_package(PkgConfig REQUIRED) # For libraries loaded using pkg-config - -- pkg_check_modules(cryptopp REQUIRED IMPORTED_TARGET libcrypto++) -+ pkg_check_modules(cryptopp REQUIRED IMPORTED_TARGET libcryptopp) - target_link_libraries(SDKlib PUBLIC PkgConfig::cryptopp) # TODO: Private for SDK core - - pkg_check_modules(sodium REQUIRED IMPORTED_TARGET libsodium) -@@ -139,7 +139,7 @@ macro(load_sdklib_libraries) - endif() - - if(USE_PDFIUM) -- pkg_check_modules(pdfium REQUIRED IMPORTED_TARGET pdfium) -+ pkg_check_modules(pdfium REQUIRED IMPORTED_TARGET libpdfium) - target_link_libraries(SDKlib PRIVATE PkgConfig::pdfium) - set(HAVE_PDFIUM 1) - endif() diff --git a/pkgs/applications/misc/megasync/030-megasync-app-fix-cmake-dependencies-detection.patch b/pkgs/applications/misc/megasync/030-megasync-app-fix-cmake-dependencies-detection.patch deleted file mode 100644 index e8703d1ce0e0..000000000000 --- a/pkgs/applications/misc/megasync/030-megasync-app-fix-cmake-dependencies-detection.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- a/src/MEGAUpdateGenerator/CMakeLists.txt -+++ b/src/MEGAUpdateGenerator/CMakeLists.txt -@@ -15,10 +15,11 @@ target_sources(MEGAUpdateGenerator - ) - - # Load and link needed libraries for the CHATlib target --find_package(cryptopp CONFIG REQUIRED) -+find_package(PkgConfig REQUIRED) -+pkg_check_modules(cryptopp REQUIRED IMPORTED_TARGET libcryptopp) - target_link_libraries(MEGAUpdateGenerator - PRIVATE -- cryptopp::cryptopp -+ PkgConfig::cryptopp - MEGA::SDKlib - ) - diff --git a/pkgs/applications/misc/megasync/default.nix b/pkgs/applications/misc/megasync/default.nix index 56c4347b36b7..45192bb0d241 100644 --- a/pkgs/applications/misc/megasync/default.nix +++ b/pkgs/applications/misc/megasync/default.nix @@ -1,7 +1,7 @@ - { lib, stdenv, + fetchpatch, c-ares, cmake, cryptopp, @@ -80,9 +80,17 @@ mkDerivation rec { ]; patches = [ - ./020-megasync-sdk-fix-cmake-dependencies-detection.patch - ./030-megasync-app-fix-cmake-dependencies-detection.patch #Thanks Arch Linux - ./040-megasync-fix-cmake-install-bindir.patch + (fetchpatch { + url = "https://aur.archlinux.org/cgit/aur.git/plain/020-megasync-sdk-fix-cmake-dependencies-detection.patch?h=megasync"; + hash = "sha256-y3WhLkawFzQRzzRBpioiyAT3F1NDQvYBOm2888g5V5c="; + 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"; + hash = "sha256-11XWctv1veUEguc9Xvz2hMYw26CaCwu6M4hyA+5r81U="; + }) + ./megasync-fix-cmake-install-bindir.patch ]; postPatch = '' diff --git a/pkgs/applications/misc/megasync/040-megasync-fix-cmake-install-bindir.patch b/pkgs/applications/misc/megasync/megasync-fix-cmake-install-bindir.patch similarity index 100% rename from pkgs/applications/misc/megasync/040-megasync-fix-cmake-install-bindir.patch rename to pkgs/applications/misc/megasync/megasync-fix-cmake-install-bindir.patch