From 47db909fb772c405fcf0bc960eb9adcf8969d513 Mon Sep 17 00:00:00 2001 From: Sughosha Date: Mon, 30 Jun 2025 14:34:57 +0530 Subject: [PATCH] gnu: nextcloud-client: Update to 3.17.2. * gnu/packages/sync.scm (nextcloud-client): Update to 3.17.2. [sourcee]: Remove "qtokenizer" from keep; replace "KF5" with "KF6". [arguments]: Switch to gexp. <#:qtbase>: Use qtbase. <#:test-exclude>: Do not exclude "SyncXAttrTest"; exclude "OwnSqlTest", "SyncJournalDBTest", "SyncFileItemTest", "ConcatUrlTest", "CookiesTest", "XmlParseTest", "ChecksumValidatorTest", "ClientSideEncryptionTest", "ExcludedFilesTest", "UtilityTest", "CapabilitiesTest", "ThemeTest", "IconUtilsTest", "FileSystemTest", "LongPathTest", "AccountTest" and "FolderTest". <#phases>: Replace 'pre-check with 'set-home-directory. In 'patch-cmake phase, rewrite the substitutes using with-directory-excursion and replace "KF5" with "KF6"; add 'unpack-3rd_party-sources phase. [native-inputs]: Switch to the new style. Replace qttools-5 with qttools; add desktop-file-utils, libcrashreporter-qt and python-sphinx. [inputs]: Remove desktop-file-utils, qtbase-5, qtgraphicaleffects and qtquickcontrols2-5; replace karchive-5 with karchive, kconfig-5 with kconfig, kcoreaddons-5 with kcoreaddons, kio-5 with kio, kwidgetsaddons-5 with kwidgetsaddons-5, qtdeclarative-5 with qtdeclarative, qtkeychain with qtkeychain-6, qtsvg-5 with qtsvg, qtwebchannel-5 with qtwebchannel and qtwebsockets-5 with qtwebsockets; add kguiaddons, libp11, qt5compat, qtwayland and qtwebengine. [propagated-inputs]: Remove qtwebengine-5. [license]: Remove unused license. Change-Id: If4ae836dd22fbc3f5909e8b1a35d5116d82607c6 --- gnu/packages/sync.scm | 180 +++++++++++++++++++++++++----------------- 1 file changed, 108 insertions(+), 72 deletions(-) diff --git a/gnu/packages/sync.scm b/gnu/packages/sync.scm index a3234576151b33115d562ac30be6bb0bb0b8ccf0..e9f7d2750e74fc32326b5b4ab7dae72c7a0fee9c 100644 --- a/gnu/packages/sync.scm +++ b/gnu/packages/sync.scm @@ -74,7 +74,7 @@ (define-public nextcloud-client (package (name "nextcloud-client") - (version "3.8.2") + (version "3.17.2") (source (origin (method git-fetch) @@ -85,14 +85,15 @@ (file-name (git-file-name name version)) (sha256 - (base32 "0gmj217jmmx13wwb096prwzn3njv616njk1id97g6lrbn969fcnn")) + (base32 "0y03yldgyazqds691dzgaginnpys6alnlc9j4aimmi3zcnk93hk3")) (modules '((guix build utils) (ice-9 ftw) (srfi srfi-1))) (snippet '(begin - ;; Not available in Guix. - (let* ((keep '("QProgressIndicator" "qtokenizer" "kirigami"))) + ;; QProgressIndicator is not available in Guix. + ;; FIXME: Fix building with the system kirigami. + (let* ((keep '("QProgressIndicator" "kirigami"))) (with-directory-excursion "src/3rdparty" (for-each delete-file-recursively (lset-difference string=? @@ -119,11 +120,11 @@ "@kwidgetsaddons@") ;; Expand libraries, that used to be statically linked, but ;; no longer are post-vendoring. - (("KF5::Archive") - (string-append "KF5::Archive " + (("KF6::Archive") + (string-append "KF6::Archive " "QtSolutions_LockedFile " "QtSolutions_SingleApplication " - "KF5WidgetsAddons"))) + "KF6WidgetsAddons"))) ;; Fix compatibility with QtSingleApplication from QtSolutions. (substitute* '("application.h" "application.cpp") (("SharedTools::QtSingleApplication") @@ -133,89 +134,124 @@ #t)))) (build-system qt-build-system) (arguments - `(#:configure-flags - (list - "-DUNIT_TESTING=ON" "-DBUILD_UPDATER=OFF") - #:imported-modules - ((guix build glib-or-gtk-build-system) - ,@%qt-build-system-modules) - #:modules - (((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:) - (guix build qt-build-system) - (guix build utils)) - #:test-exclude "SyncXAttrTest" - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'patch-cmake - (lambda* (#:key inputs #:allow-other-keys) - ;; Patch install directory for dbus service files. - (substitute* "shell_integration/libcloudproviders/CMakeLists.txt" - (("pkg_get_variable\\(_install_dir dbus-1 .*\\)") - (string-append "set(_install_dir \"${CMAKE_INSTALL_PREFIX}" - "/share/dbus-1/services\")"))) - (substitute* "shell_integration/dolphin/CMakeLists.txt" - ;; Make sure, that Qt modules are installed under $prefix. - (("ON CACHE") "OFF CACHE")) - (substitute* "src/gui/CMakeLists.txt" - (("@kwidgetsaddons@") - (search-input-directory inputs - "/include/KF5/KWidgetsAddons/"))))) - (add-before 'check 'pre-check - (lambda _ - (setenv "QT_QPA_PLATFORM" "offscreen") - ;; Tests write to $HOME. - (setenv "HOME" (getcwd)) - #t)) - (add-after 'install 'glib-or-gtk-compile-schemas - (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-compile-schemas)) - (add-after 'glib-or-gtk-compile-schemas 'glib-or-gtk-wrap - (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap))))) + (list #:qtbase qtbase + #:configure-flags #~(list "-DUNIT_TESTING=ON" "-DBUILD_UPDATER=OFF") + #:imported-modules + `((guix build glib-or-gtk-build-system) + ,@%qt-build-system-modules) + #:modules + '(((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:) + (guix build qt-build-system) + (guix build utils)) + ;; 72% tests passed, 17 tests failed out of 61 due to SEGFAULT. + #:test-exclude + (string-append "(" + (string-join '("OwnSqlTest" + "SyncJournalDBTest" + "SyncFileItemTest" + "ConcatUrlTest" + "CookiesTest" + "XmlParseTest" + "ChecksumValidatorTest" + "ClientSideEncryptionTest" + "ExcludedFilesTest" + "UtilityTest" + "CapabilitiesTest" + "ThemeTest" + "IconUtilsTest" + "FileSystemTest" + "LongPathTest" + "AccountTest" + "FolderTest") + "|") + ")") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'patch-cmake + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "src/gui/CMakeLists.txt" + (("@kwidgetsaddons@") + (search-input-directory inputs + "/include/KF6/KWidgetsAddons/"))) + (with-directory-excursion "shell_integration" + ;; Patch install directory for dbus service files. + (substitute* "libcloudproviders/CMakeLists.txt" + (("pkg_get_variable\\(_install_dir dbus-1 .*\\)") + (string-append "set(_install_dir \"" + "${CMAKE_INSTALL_PREFIX}" + "/share/dbus-1/services\")"))) + (substitute* "dolphin/CMakeLists.txt" + ;; Make sure, that Qt modules are installed under + ;; $prefix. + (("ON CACHE") "OFF CACHE"))))) + (add-after 'unpack 'unpack-3rd_party-sources + (lambda* (#:key inputs #:allow-other-keys) + (copy-recursively (assoc-ref inputs "libcrashreporter-qt") + "src/3rdparty/libcrashreporter-qt"))) + ;; Tests write to $HOME. + (add-before 'check 'set-home-directory + (lambda _ + (setenv "HOME" (getcwd)))) + (add-after 'install 'glib-or-gtk-compile-schemas + (assoc-ref glib-or-gtk:%standard-phases + 'glib-or-gtk-compile-schemas)) + (add-after 'glib-or-gtk-compile-schemas 'glib-or-gtk-wrap + (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap))))) (native-inputs - `(("cmocka" ,cmocka) - ("dot" ,graphviz) - ("doxygen" ,doxygen) - ("extra-cmake-modules" ,extra-cmake-modules) - ("glib:bin" ,glib "bin") - ("librsvg" ,(librsvg-for-system)) - ("perl" ,perl) - ("pkg-config" ,pkg-config) - ("python" ,python-wrapper) - ("qttools-5" ,qttools-5) - ("ruby" ,ruby))) + (list cmocka + desktop-file-utils + graphviz + doxygen + extra-cmake-modules + `(,glib "bin") + (origin + (method git-fetch) + (uri + (git-reference + (url "https://github.com/dschmidt/libcrashreporter-qt") + (commit "96da2900d590218b745ea79cd7aa794856e1d7ba"))) + (file-name "libcrashreporter-qt") + (sha256 + (base32 "0r14abym96fk9zwalyvyzl5igwsrpgmk2hsfxshzh2av4riq0lmk"))) + (librsvg-for-system) + perl + pkg-config + python-wrapper + python-sphinx + qttools + ruby)) (inputs (list appstream dbus - desktop-file-utils glib - karchive-5 - kconfig-5 - kcoreaddons-5 - kio-5 + karchive + kconfig + kcoreaddons + kguiaddons + kio kjs - kwidgetsaddons-5 + kwidgetsaddons libcloudproviders + libp11 libzip openssl - qtbase-5 - qtdeclarative-5 - qtgraphicaleffects - qtkeychain - qtquickcontrols2-5 + qt5compat + qtdeclarative + qtkeychain-qt6 qtsolutions - qtsvg-5 - qtwebchannel-5 - qtwebsockets-5 + qtsvg + qtwayland + qtwebchannel + qtwebengine + qtwebsockets sqlite xdg-utils zlib)) - (propagated-inputs - (list qtwebengine-5)) (synopsis "Desktop sync client for Nextcloud") (description "Nextcloud-Desktop is a tool to synchronize files from Nextcloud Server with your computer.") (home-page "https://nextcloud.com") (license (list license:expat ; QProgressIndicator - license:lgpl2.1+ ; qtokenizer license:gpl2+)))) (define-public megacmd