all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#45889] Nextcloud Desktop
@ 2021-01-15 10:09 Raghav Gururajan
  2021-01-16  6:40 ` [bug#45889] Nextcloud Desktop (v2) Raghav Gururajan
                   ` (5 more replies)
  0 siblings, 6 replies; 44+ messages in thread
From: Raghav Gururajan @ 2021-01-15 10:09 UTC (permalink / raw)
  To: 45889

[-- Attachment #1: Type: text/plain, Size: 109 bytes --]

Hello Guix!

Please find the attached patch-set to add Nextcloud desktop application 
to guix.

Regards,
RG.

[-- Attachment #2: 0001-gnu-Add-appstream.patch --]
[-- Type: text/x-patch, Size: 5478 bytes --]

From 61c8855b31df21363a92e8b2bbf5d70ab977d874 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <rg@raghavgururajan.name>
Date: Thu, 14 Jan 2021 23:32:27 -0500
Subject: [PATCH 1/2] gnu: Add appstream.

* gnu/packages/freedesktop.scm (appstream): New variable.
---
 gnu/packages/freedesktop.scm | 96 ++++++++++++++++++++++++++++++++++++
 1 file changed, 96 insertions(+)

diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 6dd37005ae..a65cc9bd90 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -58,8 +58,10 @@
   #:use-module (gnu packages bash)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
+  #:use-module (gnu packages cmake)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages cryptsetup)
+  #:use-module (gnu packages databases)
   #:use-module (gnu packages disk)
   #:use-module (gnu packages docbook)
   #:use-module (gnu packages documentation)
@@ -75,6 +77,7 @@
   #:use-module (gnu packages gstreamer)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages image)
+  #:use-module (gnu packages language)
   #:use-module (gnu packages libffi)
   #:use-module (gnu packages libunwind)
   #:use-module (gnu packages libusb)
@@ -101,6 +104,99 @@
   #:use-module (gnu packages xorg)
   #:use-module (srfi srfi-1))
 
+(define-public appstream
+  (package
+    (name "appstream")
+    (version "0.13.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append "https://www.freedesktop.org/software/"
+                       "appstream/releases/"
+                       "AppStream-" version ".tar.xz"))
+       (sha256
+        (base32 "09l6ixz1w29pi0nb0flz14m4r3f2hpqpp1fq8y66v9xa4c9fczds"))))
+    (build-system meson-build-system)
+    (arguments
+     `(#:glib-or-gtk? #t
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-libstemmer
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "meson.build"
+               (("/usr/include")
+                (string-append (assoc-ref inputs "libstemmer")
+                               "/include")))
+             #t))
+         (add-after 'patch-libstemmer 'patch-docbook-xml
+           (lambda* (#:key inputs #:allow-other-keys)
+             (with-directory-excursion "docs/api"
+               (substitute* "appstream-docs.xml"
+                 (("http://www.oasis-open.org/docbook/xml/4.3/")
+                  (string-append (assoc-ref inputs "docbook-xml-4.3")
+                                 "/xml/dtd/docbook/"))))
+             (for-each (lambda (file)
+                         (substitute* file
+                           (("http://www.oasis-open.org/docbook/xml/4.5/")
+                            (string-append (assoc-ref inputs "docbook-xml")
+                                           "/xml/dtd/docbook/"))))
+                       (find-files "scripts/desc" "\\.xml$"))
+             #t))
+         (add-after 'patch-docbook-xml 'disable-failing-tests
+           (lambda _
+             (substitute* "tests/test-pool.c"
+               (("	g_test_add_func \\(\"/AppStream/PoolRead\", test_pool_read\\);")
+                "")
+               (("	g_test_add_func \\(\"/AppStream/PoolReadAsync\", test_pool_read_async\\);")
+                "")
+               (("	g_test_add_func \\(\"/AppStream/PoolEmpty\", test_pool_empty\\);")
+                "")
+               (("	g_test_add_func \\(\"/AppStream/Cache\", test_cache\\);")
+                "")
+               (("	g_test_add_func \\(\"/AppStream/Merges\", test_merge_components\\);")
+                ""))
+             #t))
+         (add-after 'disable-failing-tests 'patch-install-dir
+           (lambda* (#:key outputs #:allow-other-keys)
+             (substitute* "data/meson.build"
+               (("/etc")
+                (string-append (assoc-ref outputs "out")
+                               "/etc")))
+             #t)))))
+    (native-inputs
+     `(("cmake" ,cmake)
+       ("docbook-xml-4.3" ,docbook-xml-4.3)
+       ("docbook-xml" ,docbook-xml)
+       ("docbook-xsl" ,docbook-xsl)
+       ("gettext" ,gettext-minimal)
+       ("glib:bin" ,glib "bin")
+       ("gobject-introspection" ,gobject-introspection)
+       ("gperf" ,gperf)
+       ("gtk-doc" ,gtk-doc)
+       ("pkg-config" ,pkg-config)
+       ("python" ,python-wrapper)
+       ("xsltproc" ,libxslt)))
+    (inputs
+     `(("libsoup" ,libsoup)
+       ("libstemmer" ,libstemmer)
+       ("libxml2" ,libxml2)
+       ("libyaml" ,libyaml)
+       ("lmdb" ,lmdb)))
+    (propagated-inputs
+     `(("glib" ,glib)))
+    (synopsis "Tools and libraries to work with AppStream metadata")
+    (description "AppStream is a cross-distribution effort for enhancing the way
+we interact with the software repositories provided by distributions by
+standardizing software component metadata.  It provides the foundation to build
+software-center applications, by providing metadata necessary for an
+application-centric view on package repositories.  It additionally provides
+specifications for things like an unified software metadata database, screenshot
+services and various other things needed to create user-friendly
+application-centers for distributions.")
+    (home-page "https://www.freedesktop.org/wiki/Distributions/AppStream/")
+    (license license:gpl2+)))
+
 (define-public farstream
   (package
     (name "farstream")
-- 
2.30.0


[-- Attachment #3: 0002-gnu-Add-nextcloud-desktop.patch --]
[-- Type: text/x-patch, Size: 6736 bytes --]

From aa2f1809b0d7250d10086211cd23a6e5a4e86d94 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <rg@raghavgururajan.name>
Date: Fri, 15 Jan 2021 05:04:31 -0500
Subject: [PATCH 2/2] gnu: Add nextcloud-desktop.

* gnu/packages/nextcloud.scm: New module.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
* gnu/packages/nextcloud.scm (nextcloud-desktop): New variable.
---
 gnu/local.mk               |   1 +
 gnu/packages/nextcloud.scm | 145 +++++++++++++++++++++++++++++++++++++
 2 files changed, 146 insertions(+)
 create mode 100644 gnu/packages/nextcloud.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index 747cbb1da7..9c155fff73 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -398,6 +398,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/netpbm.scm			\
   %D%/packages/nettle.scm			\
   %D%/packages/networking.scm			\
+  %D%/packages/nextcloud.scm              \
   %D%/packages/nfs.scm                          \
   %D%/packages/nickle.scm                       \
   %D%/packages/nicotine.scm                     \
diff --git a/gnu/packages/nextcloud.scm b/gnu/packages/nextcloud.scm
new file mode 100644
index 0000000000..e8280feace
--- /dev/null
+++ b/gnu/packages/nextcloud.scm
@@ -0,0 +1,145 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2021 Raghav Gururajan <rg@raghavgururajan.name>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages nextcloud)
+  #:use-module (gnu packages)
+  #:use-module (gnu packages check)
+  #:use-module (gnu packages compression)
+  #:use-module (gnu packages documentation)
+  #:use-module (gnu packages freedesktop)
+  #:use-module (gnu packages glib)
+  #:use-module (gnu packages gnome)
+  #:use-module (gnu packages graphviz)
+  #:use-module (gnu packages kde-frameworks)
+  #:use-module (gnu packages perl)
+  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages python)
+  #:use-module (gnu packages qt)
+  #:use-module (gnu packages ruby)
+  #:use-module (gnu packages sphinx)
+  #:use-module (gnu packages sqlite)
+  #:use-module (gnu packages tls)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix packages)
+  #:use-module (guix git-download)
+  #:use-module (guix build-system glib-or-gtk)
+  #:use-module (guix build-system qt))
+
+(define-public nextcloud-desktop
+  (package
+    (name "nextcloud-desktop")
+    (version "3.1.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://github.com/nextcloud/desktop.git")
+         (commit
+          (string-append "v" version))))
+       (file-name
+        (git-file-name name version))
+       (sha256
+        (base32 "1ba9z1kv3wlrmaxsn442vn0inzbd0smvq4xkavarn1h8i0dm62hb"))))
+    (build-system qt-build-system)
+    (arguments
+     `(#:configure-flags
+       (list
+        "-DUNIT_TESTING=ON")
+       #:imported-modules
+       (,@%qt-build-system-modules
+        (guix build glib-or-gtk-build-system))
+       #:modules
+       ((guix build qt-build-system)
+        ((guix build glib-or-gtk-build-system)
+         #:prefix glib-or-gtk:)
+        (guix build utils))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'remove-thirdparty
+           (lambda _
+             (with-directory-excursion "src/3rdparty"
+               (for-each delete-file-recursively
+                         (list
+                          "libcrashreporter-qt"
+                          "sqlite3")))
+             #t))
+         (add-after 'remove-thirdparty 'patch-plugin-dirs
+           (lambda* (#:key outputs #:allow-other-keys)
+             (substitute* "shell_integration/libcloudproviders/CMakeLists.txt"
+               (("PKGCONFIG_GETVAR\\(dbus-1 session_bus_services_dir _install_dir\\)")
+                "set(_install_dir \"${CMAKE_INSTALL_PREFIX}/share/dbus-1/services\")"))
+             (substitute* "shell_integration/dolphin/CMakeLists.txt"
+               (("ON CACHE")
+                "OFF CACHE")
+               (("\\$\\{KDE_INSTALL_KSERVICES5DIR\\}")
+                (string-append
+                 (assoc-ref outputs "out")
+                 "/lib/qt5/plugins"))
+               (("\\$\\{KDE_INSTALL_PLUGINDIR\\}")
+                (string-append
+                 (assoc-ref outputs "out")
+                 "/lib/qt5/plugins")))
+             #t))
+         (add-before 'build 'gate
+           (lambda _
+             #t))
+         (add-before 'check 'pre-check
+           (lambda _
+             (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)))))
+    (native-inputs
+     `(("cmocka" ,cmocka)
+       ("dot" ,graphviz)
+       ("doxygen" ,doxygen)
+       ("extra-cmake-modules" ,extra-cmake-modules)
+       ("glib:bin" ,glib "bin")
+       ("perl" ,perl)
+       ("pkg-config" ,pkg-config)
+       ("python" ,python-wrapper)
+       ("qttools" ,qttools)
+       ("ruby" ,ruby)
+       ("sphinx" ,python-sphinx)))
+    (inputs
+     `(("appstream" ,appstream)
+       ("dbus" ,dbus)
+       ("glib" ,glib)
+       ("kconfig" ,kconfig)
+       ("kcoreaddons" ,kcoreaddons)
+       ("kio" ,kio)
+       ("libcloudproviders" ,libcloudproviders)
+       ("openssl" ,openssl)
+       ("qtbase" ,qtbase)
+       ("qtdeclarative" ,qtdeclarative)
+       ("qtkeychain" ,qtkeychain)
+       ("qtquickcontrols2" ,qtquickcontrols2)
+       ("qtsvg" ,qtsvg)
+       ("qtwebchannel" ,qtwebchannel)
+       ("qtwebengine" ,qtwebengine)
+       ("qtwebkit" ,qtwebkit)
+       ("sqlite" ,sqlite)
+       ("zlib" ,zlib)))
+    (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/install/#install-clients")
+    (license license:gpl2+)))
-- 
2.30.0


^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [bug#45889] Nextcloud Desktop (v2)
  2021-01-15 10:09 [bug#45889] Nextcloud Desktop Raghav Gururajan
@ 2021-01-16  6:40 ` Raghav Gururajan
  2021-01-16  8:33 ` [bug#45889] Nextcloud Desktop (v3) Raghav Gururajan
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 44+ messages in thread
From: Raghav Gururajan @ 2021-01-16  6:40 UTC (permalink / raw)
  To: 45889

[-- Attachment #1: Type: text/plain, Size: 0 bytes --]



[-- Attachment #2: 0001-gnu-Add-appstream.patch --]
[-- Type: text/x-patch, Size: 5478 bytes --]

From 61c8855b31df21363a92e8b2bbf5d70ab977d874 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <rg@raghavgururajan.name>
Date: Thu, 14 Jan 2021 23:32:27 -0500
Subject: [PATCH 1/2] gnu: Add appstream.

* gnu/packages/freedesktop.scm (appstream): New variable.
---
 gnu/packages/freedesktop.scm | 96 ++++++++++++++++++++++++++++++++++++
 1 file changed, 96 insertions(+)

diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 6dd37005ae..a65cc9bd90 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -58,8 +58,10 @@
   #:use-module (gnu packages bash)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
+  #:use-module (gnu packages cmake)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages cryptsetup)
+  #:use-module (gnu packages databases)
   #:use-module (gnu packages disk)
   #:use-module (gnu packages docbook)
   #:use-module (gnu packages documentation)
@@ -75,6 +77,7 @@
   #:use-module (gnu packages gstreamer)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages image)
+  #:use-module (gnu packages language)
   #:use-module (gnu packages libffi)
   #:use-module (gnu packages libunwind)
   #:use-module (gnu packages libusb)
@@ -101,6 +104,99 @@
   #:use-module (gnu packages xorg)
   #:use-module (srfi srfi-1))
 
+(define-public appstream
+  (package
+    (name "appstream")
+    (version "0.13.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append "https://www.freedesktop.org/software/"
+                       "appstream/releases/"
+                       "AppStream-" version ".tar.xz"))
+       (sha256
+        (base32 "09l6ixz1w29pi0nb0flz14m4r3f2hpqpp1fq8y66v9xa4c9fczds"))))
+    (build-system meson-build-system)
+    (arguments
+     `(#:glib-or-gtk? #t
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-libstemmer
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "meson.build"
+               (("/usr/include")
+                (string-append (assoc-ref inputs "libstemmer")
+                               "/include")))
+             #t))
+         (add-after 'patch-libstemmer 'patch-docbook-xml
+           (lambda* (#:key inputs #:allow-other-keys)
+             (with-directory-excursion "docs/api"
+               (substitute* "appstream-docs.xml"
+                 (("http://www.oasis-open.org/docbook/xml/4.3/")
+                  (string-append (assoc-ref inputs "docbook-xml-4.3")
+                                 "/xml/dtd/docbook/"))))
+             (for-each (lambda (file)
+                         (substitute* file
+                           (("http://www.oasis-open.org/docbook/xml/4.5/")
+                            (string-append (assoc-ref inputs "docbook-xml")
+                                           "/xml/dtd/docbook/"))))
+                       (find-files "scripts/desc" "\\.xml$"))
+             #t))
+         (add-after 'patch-docbook-xml 'disable-failing-tests
+           (lambda _
+             (substitute* "tests/test-pool.c"
+               (("	g_test_add_func \\(\"/AppStream/PoolRead\", test_pool_read\\);")
+                "")
+               (("	g_test_add_func \\(\"/AppStream/PoolReadAsync\", test_pool_read_async\\);")
+                "")
+               (("	g_test_add_func \\(\"/AppStream/PoolEmpty\", test_pool_empty\\);")
+                "")
+               (("	g_test_add_func \\(\"/AppStream/Cache\", test_cache\\);")
+                "")
+               (("	g_test_add_func \\(\"/AppStream/Merges\", test_merge_components\\);")
+                ""))
+             #t))
+         (add-after 'disable-failing-tests 'patch-install-dir
+           (lambda* (#:key outputs #:allow-other-keys)
+             (substitute* "data/meson.build"
+               (("/etc")
+                (string-append (assoc-ref outputs "out")
+                               "/etc")))
+             #t)))))
+    (native-inputs
+     `(("cmake" ,cmake)
+       ("docbook-xml-4.3" ,docbook-xml-4.3)
+       ("docbook-xml" ,docbook-xml)
+       ("docbook-xsl" ,docbook-xsl)
+       ("gettext" ,gettext-minimal)
+       ("glib:bin" ,glib "bin")
+       ("gobject-introspection" ,gobject-introspection)
+       ("gperf" ,gperf)
+       ("gtk-doc" ,gtk-doc)
+       ("pkg-config" ,pkg-config)
+       ("python" ,python-wrapper)
+       ("xsltproc" ,libxslt)))
+    (inputs
+     `(("libsoup" ,libsoup)
+       ("libstemmer" ,libstemmer)
+       ("libxml2" ,libxml2)
+       ("libyaml" ,libyaml)
+       ("lmdb" ,lmdb)))
+    (propagated-inputs
+     `(("glib" ,glib)))
+    (synopsis "Tools and libraries to work with AppStream metadata")
+    (description "AppStream is a cross-distribution effort for enhancing the way
+we interact with the software repositories provided by distributions by
+standardizing software component metadata.  It provides the foundation to build
+software-center applications, by providing metadata necessary for an
+application-centric view on package repositories.  It additionally provides
+specifications for things like an unified software metadata database, screenshot
+services and various other things needed to create user-friendly
+application-centers for distributions.")
+    (home-page "https://www.freedesktop.org/wiki/Distributions/AppStream/")
+    (license license:gpl2+)))
+
 (define-public farstream
   (package
     (name "farstream")
-- 
2.30.0


[-- Attachment #3: 0002-gnu-Add-nextcloud-desktop.patch --]
[-- Type: text/x-patch, Size: 6762 bytes --]

From 4346ce4e708876e2951987c5284c8579c1ccdc2f Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <rg@raghavgururajan.name>
Date: Fri, 15 Jan 2021 05:04:31 -0500
Subject: [PATCH 2/2] gnu: Add nextcloud-desktop.

* gnu/packages/nextcloud.scm: New module.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
* gnu/packages/nextcloud.scm (nextcloud-desktop): New variable.
---
 gnu/local.mk               |   1 +
 gnu/packages/nextcloud.scm | 146 +++++++++++++++++++++++++++++++++++++
 2 files changed, 147 insertions(+)
 create mode 100644 gnu/packages/nextcloud.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index 747cbb1da7..9c155fff73 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -398,6 +398,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/netpbm.scm			\
   %D%/packages/nettle.scm			\
   %D%/packages/networking.scm			\
+  %D%/packages/nextcloud.scm              \
   %D%/packages/nfs.scm                          \
   %D%/packages/nickle.scm                       \
   %D%/packages/nicotine.scm                     \
diff --git a/gnu/packages/nextcloud.scm b/gnu/packages/nextcloud.scm
new file mode 100644
index 0000000000..8ab1a5393f
--- /dev/null
+++ b/gnu/packages/nextcloud.scm
@@ -0,0 +1,146 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2021 Raghav Gururajan <rg@raghavgururajan.name>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages nextcloud)
+  #:use-module (gnu packages)
+  #:use-module (gnu packages check)
+  #:use-module (gnu packages compression)
+  #:use-module (gnu packages documentation)
+  #:use-module (gnu packages freedesktop)
+  #:use-module (gnu packages glib)
+  #:use-module (gnu packages gnome)
+  #:use-module (gnu packages graphviz)
+  #:use-module (gnu packages kde-frameworks)
+  #:use-module (gnu packages perl)
+  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages python)
+  #:use-module (gnu packages qt)
+  #:use-module (gnu packages ruby)
+  #:use-module (gnu packages sphinx)
+  #:use-module (gnu packages sqlite)
+  #:use-module (gnu packages tls)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix packages)
+  #:use-module (guix git-download)
+  #:use-module (guix build-system glib-or-gtk)
+  #:use-module (guix build-system qt))
+
+(define-public nextcloud-desktop
+  (package
+    (name "nextcloud-desktop")
+    (version "3.1.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://github.com/nextcloud/desktop.git")
+         (commit
+          (string-append "v" version))))
+       (file-name
+        (git-file-name name version))
+       (sha256
+        (base32 "1ba9z1kv3wlrmaxsn442vn0inzbd0smvq4xkavarn1h8i0dm62hb"))))
+    (build-system qt-build-system)
+    (arguments
+     `(#:configure-flags
+       (list
+        "-DUNIT_TESTING=ON")
+       #:imported-modules
+       (,@%qt-build-system-modules
+        (guix build glib-or-gtk-build-system))
+       #:modules
+       ((guix build qt-build-system)
+        ((guix build glib-or-gtk-build-system)
+         #:prefix glib-or-gtk:)
+        (guix build utils))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'remove-thirdparty
+           (lambda _
+             (with-directory-excursion "src/3rdparty"
+               (for-each delete-file-recursively
+                         (list
+                          "libcrashreporter-qt"
+                          "sqlite3")))
+             #t))
+         (add-after 'remove-thirdparty 'patch-plugin-dirs
+           (lambda* (#:key outputs #:allow-other-keys)
+             (substitute* "shell_integration/libcloudproviders/CMakeLists.txt"
+               (("PKGCONFIG_GETVAR\\(dbus-1 session_bus_services_dir _install_dir\\)")
+                "set(_install_dir \"${CMAKE_INSTALL_PREFIX}/share/dbus-1/services\")"))
+             (substitute* "shell_integration/dolphin/CMakeLists.txt"
+               (("ON CACHE")
+                "OFF CACHE")
+               (("\\$\\{KDE_INSTALL_KSERVICES5DIR\\}")
+                (string-append
+                 (assoc-ref outputs "out")
+                 "/lib/qt5/plugins"))
+               (("\\$\\{KDE_INSTALL_PLUGINDIR\\}")
+                (string-append
+                 (assoc-ref outputs "out")
+                 "/lib/qt5/plugins")))
+             #t))
+         (add-before 'build 'gate
+           (lambda _
+             #t))
+         (add-before 'check 'pre-check
+           (lambda _
+             (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)))))
+    (native-inputs
+     `(("cmocka" ,cmocka)
+       ("dot" ,graphviz)
+       ("doxygen" ,doxygen)
+       ("extra-cmake-modules" ,extra-cmake-modules)
+       ("glib:bin" ,glib "bin")
+       ("perl" ,perl)
+       ("pkg-config" ,pkg-config)
+       ("python" ,python-wrapper)
+       ("qttools" ,qttools)
+       ("ruby" ,ruby)
+       ("sphinx" ,python-sphinx)))
+    (inputs
+     `(("appstream" ,appstream)
+       ("dbus" ,dbus)
+       ("glib" ,glib)
+       ("kconfig" ,kconfig)
+       ("kcoreaddons" ,kcoreaddons)
+       ("kio" ,kio)
+       ("libcloudproviders" ,libcloudproviders)
+       ("openssl" ,openssl)
+       ("qtbase" ,qtbase)
+       ("qtdeclarative" ,qtdeclarative)
+       ("qtkeychain" ,qtkeychain)
+       ("qtquickcontrols2" ,qtquickcontrols2)
+       ("qtsvg" ,qtsvg)
+       ("qtwebchannel" ,qtwebchannel)
+       ("qtwebkit" ,qtwebkit)
+       ("sqlite" ,sqlite)
+       ("zlib" ,zlib)))
+    (propagated-inputs
+     `(("qtwebengine" ,qtwebengine)))
+    (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/install/#install-clients")
+    (license license:gpl2+)))
-- 
2.30.0


^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [bug#45889] Nextcloud Desktop (v3)
  2021-01-15 10:09 [bug#45889] Nextcloud Desktop Raghav Gururajan
  2021-01-16  6:40 ` [bug#45889] Nextcloud Desktop (v2) Raghav Gururajan
@ 2021-01-16  8:33 ` Raghav Gururajan
  2021-01-16 10:09 ` [bug#45889] Nextcloud Desktop (v4) Raghav Gururajan
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 44+ messages in thread
From: Raghav Gururajan @ 2021-01-16  8:33 UTC (permalink / raw)
  To: 45889

[-- Attachment #1: Type: text/plain, Size: 0 bytes --]



[-- Attachment #2: 0001-gnu-Add-appstream.patch --]
[-- Type: text/x-patch, Size: 5478 bytes --]

From 61c8855b31df21363a92e8b2bbf5d70ab977d874 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <rg@raghavgururajan.name>
Date: Thu, 14 Jan 2021 23:32:27 -0500
Subject: [PATCH 1/2] gnu: Add appstream.

* gnu/packages/freedesktop.scm (appstream): New variable.
---
 gnu/packages/freedesktop.scm | 96 ++++++++++++++++++++++++++++++++++++
 1 file changed, 96 insertions(+)

diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 6dd37005ae..a65cc9bd90 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -58,8 +58,10 @@
   #:use-module (gnu packages bash)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
+  #:use-module (gnu packages cmake)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages cryptsetup)
+  #:use-module (gnu packages databases)
   #:use-module (gnu packages disk)
   #:use-module (gnu packages docbook)
   #:use-module (gnu packages documentation)
@@ -75,6 +77,7 @@
   #:use-module (gnu packages gstreamer)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages image)
+  #:use-module (gnu packages language)
   #:use-module (gnu packages libffi)
   #:use-module (gnu packages libunwind)
   #:use-module (gnu packages libusb)
@@ -101,6 +104,99 @@
   #:use-module (gnu packages xorg)
   #:use-module (srfi srfi-1))
 
+(define-public appstream
+  (package
+    (name "appstream")
+    (version "0.13.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append "https://www.freedesktop.org/software/"
+                       "appstream/releases/"
+                       "AppStream-" version ".tar.xz"))
+       (sha256
+        (base32 "09l6ixz1w29pi0nb0flz14m4r3f2hpqpp1fq8y66v9xa4c9fczds"))))
+    (build-system meson-build-system)
+    (arguments
+     `(#:glib-or-gtk? #t
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-libstemmer
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "meson.build"
+               (("/usr/include")
+                (string-append (assoc-ref inputs "libstemmer")
+                               "/include")))
+             #t))
+         (add-after 'patch-libstemmer 'patch-docbook-xml
+           (lambda* (#:key inputs #:allow-other-keys)
+             (with-directory-excursion "docs/api"
+               (substitute* "appstream-docs.xml"
+                 (("http://www.oasis-open.org/docbook/xml/4.3/")
+                  (string-append (assoc-ref inputs "docbook-xml-4.3")
+                                 "/xml/dtd/docbook/"))))
+             (for-each (lambda (file)
+                         (substitute* file
+                           (("http://www.oasis-open.org/docbook/xml/4.5/")
+                            (string-append (assoc-ref inputs "docbook-xml")
+                                           "/xml/dtd/docbook/"))))
+                       (find-files "scripts/desc" "\\.xml$"))
+             #t))
+         (add-after 'patch-docbook-xml 'disable-failing-tests
+           (lambda _
+             (substitute* "tests/test-pool.c"
+               (("	g_test_add_func \\(\"/AppStream/PoolRead\", test_pool_read\\);")
+                "")
+               (("	g_test_add_func \\(\"/AppStream/PoolReadAsync\", test_pool_read_async\\);")
+                "")
+               (("	g_test_add_func \\(\"/AppStream/PoolEmpty\", test_pool_empty\\);")
+                "")
+               (("	g_test_add_func \\(\"/AppStream/Cache\", test_cache\\);")
+                "")
+               (("	g_test_add_func \\(\"/AppStream/Merges\", test_merge_components\\);")
+                ""))
+             #t))
+         (add-after 'disable-failing-tests 'patch-install-dir
+           (lambda* (#:key outputs #:allow-other-keys)
+             (substitute* "data/meson.build"
+               (("/etc")
+                (string-append (assoc-ref outputs "out")
+                               "/etc")))
+             #t)))))
+    (native-inputs
+     `(("cmake" ,cmake)
+       ("docbook-xml-4.3" ,docbook-xml-4.3)
+       ("docbook-xml" ,docbook-xml)
+       ("docbook-xsl" ,docbook-xsl)
+       ("gettext" ,gettext-minimal)
+       ("glib:bin" ,glib "bin")
+       ("gobject-introspection" ,gobject-introspection)
+       ("gperf" ,gperf)
+       ("gtk-doc" ,gtk-doc)
+       ("pkg-config" ,pkg-config)
+       ("python" ,python-wrapper)
+       ("xsltproc" ,libxslt)))
+    (inputs
+     `(("libsoup" ,libsoup)
+       ("libstemmer" ,libstemmer)
+       ("libxml2" ,libxml2)
+       ("libyaml" ,libyaml)
+       ("lmdb" ,lmdb)))
+    (propagated-inputs
+     `(("glib" ,glib)))
+    (synopsis "Tools and libraries to work with AppStream metadata")
+    (description "AppStream is a cross-distribution effort for enhancing the way
+we interact with the software repositories provided by distributions by
+standardizing software component metadata.  It provides the foundation to build
+software-center applications, by providing metadata necessary for an
+application-centric view on package repositories.  It additionally provides
+specifications for things like an unified software metadata database, screenshot
+services and various other things needed to create user-friendly
+application-centers for distributions.")
+    (home-page "https://www.freedesktop.org/wiki/Distributions/AppStream/")
+    (license license:gpl2+)))
+
 (define-public farstream
   (package
     (name "farstream")
-- 
2.30.0


[-- Attachment #3: 0002-gnu-Add-nextcloud-desktop.patch --]
[-- Type: text/x-patch, Size: 6348 bytes --]

From b2937fe6c61cab1fc900ba786129c458cee5bb3c Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <rg@raghavgururajan.name>
Date: Fri, 15 Jan 2021 05:04:31 -0500
Subject: [PATCH 2/2] gnu: Add nextcloud-desktop.

* gnu/packages/nextcloud.scm: New module.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
* gnu/packages/nextcloud.scm (nextcloud-desktop): New variable.
---
 gnu/local.mk               |   1 +
 gnu/packages/nextcloud.scm | 135 +++++++++++++++++++++++++++++++++++++
 2 files changed, 136 insertions(+)
 create mode 100644 gnu/packages/nextcloud.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index 747cbb1da7..9c155fff73 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -398,6 +398,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/netpbm.scm			\
   %D%/packages/nettle.scm			\
   %D%/packages/networking.scm			\
+  %D%/packages/nextcloud.scm              \
   %D%/packages/nfs.scm                          \
   %D%/packages/nickle.scm                       \
   %D%/packages/nicotine.scm                     \
diff --git a/gnu/packages/nextcloud.scm b/gnu/packages/nextcloud.scm
new file mode 100644
index 0000000000..594392605b
--- /dev/null
+++ b/gnu/packages/nextcloud.scm
@@ -0,0 +1,135 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2021 Raghav Gururajan <rg@raghavgururajan.name>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages nextcloud)
+  #:use-module (gnu packages)
+  #:use-module (gnu packages check)
+  #:use-module (gnu packages compression)
+  #:use-module (gnu packages documentation)
+  #:use-module (gnu packages freedesktop)
+  #:use-module (gnu packages glib)
+  #:use-module (gnu packages gnome)
+  #:use-module (gnu packages graphviz)
+  #:use-module (gnu packages kde-frameworks)
+  #:use-module (gnu packages perl)
+  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages python)
+  #:use-module (gnu packages qt)
+  #:use-module (gnu packages ruby)
+  #:use-module (gnu packages sphinx)
+  #:use-module (gnu packages sqlite)
+  #:use-module (gnu packages tls)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix packages)
+  #:use-module (guix git-download)
+  #:use-module (guix build-system glib-or-gtk)
+  #:use-module (guix build-system qt))
+
+(define-public nextcloud-desktop
+  (package
+    (name "nextcloud-desktop")
+    (version "3.1.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://github.com/nextcloud/desktop.git")
+         (commit
+          (string-append "v" version))))
+       (file-name
+        (git-file-name name version))
+       (sha256
+        (base32 "1ba9z1kv3wlrmaxsn442vn0inzbd0smvq4xkavarn1h8i0dm62hb"))))
+    (build-system qt-build-system)
+    (arguments
+     `(#:configure-flags
+       (list
+        "-DUNIT_TESTING=ON")
+       #:imported-modules
+       (,@%qt-build-system-modules
+        (guix build glib-or-gtk-build-system))
+       #:modules
+       ((guix build qt-build-system)
+        ((guix build glib-or-gtk-build-system)
+         #:prefix glib-or-gtk:)
+        (guix build utils))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'remove-thirdparty
+           (lambda _
+             (with-directory-excursion "src/3rdparty"
+               (for-each delete-file-recursively
+                         (list
+                          "libcrashreporter-qt"
+                          "sqlite3")))
+             #t))
+         (add-after 'remove-thirdparty 'patch-plugin-dirs
+           (lambda* (#:key outputs #:allow-other-keys)
+             (substitute* "shell_integration/libcloudproviders/CMakeLists.txt"
+               (("PKGCONFIG_GETVAR\\(dbus-1 session_bus_services_dir _install_dir\\)")
+                "set(_install_dir \"${CMAKE_INSTALL_PREFIX}/share/dbus-1/services\")"))
+             (substitute* "shell_integration/dolphin/CMakeLists.txt"
+               (("ON CACHE")
+                "OFF CACHE"))
+             #t))
+         (add-before 'check 'pre-check
+           (lambda _
+             (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)))))
+    (native-inputs
+     `(("cmocka" ,cmocka)
+       ("dot" ,graphviz)
+       ("doxygen" ,doxygen)
+       ("extra-cmake-modules" ,extra-cmake-modules)
+       ("glib:bin" ,glib "bin")
+       ("perl" ,perl)
+       ("pkg-config" ,pkg-config)
+       ("python" ,python-wrapper)
+       ("qttools" ,qttools)
+       ("ruby" ,ruby)
+       ("sphinx" ,python-sphinx)))
+    (inputs
+     `(("appstream" ,appstream)
+       ("dbus" ,dbus)
+       ("glib" ,glib)
+       ("kconfig" ,kconfig)
+       ("kcoreaddons" ,kcoreaddons)
+       ("kio" ,kio)
+       ("libcloudproviders" ,libcloudproviders)
+       ("openssl" ,openssl)
+       ("qtbase" ,qtbase)
+       ("qtdeclarative" ,qtdeclarative)
+       ("qtkeychain" ,qtkeychain)
+       ("qtquickcontrols2" ,qtquickcontrols2)
+       ("qtsvg" ,qtsvg)
+       ("qtwebchannel" ,qtwebchannel)
+       ("qtwebkit" ,qtwebkit)
+       ("sqlite" ,sqlite)
+       ("zlib" ,zlib)))
+    (propagated-inputs
+     `(("qtwebengine" ,qtwebengine)))
+    (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/install/#install-clients")
+    (license license:gpl2+)))
-- 
2.30.0


^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [bug#45889] Nextcloud Desktop (v4)
  2021-01-15 10:09 [bug#45889] Nextcloud Desktop Raghav Gururajan
  2021-01-16  6:40 ` [bug#45889] Nextcloud Desktop (v2) Raghav Gururajan
  2021-01-16  8:33 ` [bug#45889] Nextcloud Desktop (v3) Raghav Gururajan
@ 2021-01-16 10:09 ` Raghav Gururajan
  2021-01-16 10:48   ` Nicolò Balzarotti
  2021-01-16 14:34 ` [bug#45889] Nextcloud Desktop (v5) Raghav Gururajan
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 44+ messages in thread
From: Raghav Gururajan @ 2021-01-16 10:09 UTC (permalink / raw)
  To: 45889

[-- Attachment #1: Type: text/plain, Size: 0 bytes --]



[-- Attachment #2: 0001-gnu-Add-appstream.patch --]
[-- Type: text/x-patch, Size: 5478 bytes --]

From 61c8855b31df21363a92e8b2bbf5d70ab977d874 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <rg@raghavgururajan.name>
Date: Thu, 14 Jan 2021 23:32:27 -0500
Subject: [PATCH 1/2] gnu: Add appstream.

* gnu/packages/freedesktop.scm (appstream): New variable.
---
 gnu/packages/freedesktop.scm | 96 ++++++++++++++++++++++++++++++++++++
 1 file changed, 96 insertions(+)

diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 6dd37005ae..a65cc9bd90 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -58,8 +58,10 @@
   #:use-module (gnu packages bash)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
+  #:use-module (gnu packages cmake)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages cryptsetup)
+  #:use-module (gnu packages databases)
   #:use-module (gnu packages disk)
   #:use-module (gnu packages docbook)
   #:use-module (gnu packages documentation)
@@ -75,6 +77,7 @@
   #:use-module (gnu packages gstreamer)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages image)
+  #:use-module (gnu packages language)
   #:use-module (gnu packages libffi)
   #:use-module (gnu packages libunwind)
   #:use-module (gnu packages libusb)
@@ -101,6 +104,99 @@
   #:use-module (gnu packages xorg)
   #:use-module (srfi srfi-1))
 
+(define-public appstream
+  (package
+    (name "appstream")
+    (version "0.13.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append "https://www.freedesktop.org/software/"
+                       "appstream/releases/"
+                       "AppStream-" version ".tar.xz"))
+       (sha256
+        (base32 "09l6ixz1w29pi0nb0flz14m4r3f2hpqpp1fq8y66v9xa4c9fczds"))))
+    (build-system meson-build-system)
+    (arguments
+     `(#:glib-or-gtk? #t
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-libstemmer
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "meson.build"
+               (("/usr/include")
+                (string-append (assoc-ref inputs "libstemmer")
+                               "/include")))
+             #t))
+         (add-after 'patch-libstemmer 'patch-docbook-xml
+           (lambda* (#:key inputs #:allow-other-keys)
+             (with-directory-excursion "docs/api"
+               (substitute* "appstream-docs.xml"
+                 (("http://www.oasis-open.org/docbook/xml/4.3/")
+                  (string-append (assoc-ref inputs "docbook-xml-4.3")
+                                 "/xml/dtd/docbook/"))))
+             (for-each (lambda (file)
+                         (substitute* file
+                           (("http://www.oasis-open.org/docbook/xml/4.5/")
+                            (string-append (assoc-ref inputs "docbook-xml")
+                                           "/xml/dtd/docbook/"))))
+                       (find-files "scripts/desc" "\\.xml$"))
+             #t))
+         (add-after 'patch-docbook-xml 'disable-failing-tests
+           (lambda _
+             (substitute* "tests/test-pool.c"
+               (("	g_test_add_func \\(\"/AppStream/PoolRead\", test_pool_read\\);")
+                "")
+               (("	g_test_add_func \\(\"/AppStream/PoolReadAsync\", test_pool_read_async\\);")
+                "")
+               (("	g_test_add_func \\(\"/AppStream/PoolEmpty\", test_pool_empty\\);")
+                "")
+               (("	g_test_add_func \\(\"/AppStream/Cache\", test_cache\\);")
+                "")
+               (("	g_test_add_func \\(\"/AppStream/Merges\", test_merge_components\\);")
+                ""))
+             #t))
+         (add-after 'disable-failing-tests 'patch-install-dir
+           (lambda* (#:key outputs #:allow-other-keys)
+             (substitute* "data/meson.build"
+               (("/etc")
+                (string-append (assoc-ref outputs "out")
+                               "/etc")))
+             #t)))))
+    (native-inputs
+     `(("cmake" ,cmake)
+       ("docbook-xml-4.3" ,docbook-xml-4.3)
+       ("docbook-xml" ,docbook-xml)
+       ("docbook-xsl" ,docbook-xsl)
+       ("gettext" ,gettext-minimal)
+       ("glib:bin" ,glib "bin")
+       ("gobject-introspection" ,gobject-introspection)
+       ("gperf" ,gperf)
+       ("gtk-doc" ,gtk-doc)
+       ("pkg-config" ,pkg-config)
+       ("python" ,python-wrapper)
+       ("xsltproc" ,libxslt)))
+    (inputs
+     `(("libsoup" ,libsoup)
+       ("libstemmer" ,libstemmer)
+       ("libxml2" ,libxml2)
+       ("libyaml" ,libyaml)
+       ("lmdb" ,lmdb)))
+    (propagated-inputs
+     `(("glib" ,glib)))
+    (synopsis "Tools and libraries to work with AppStream metadata")
+    (description "AppStream is a cross-distribution effort for enhancing the way
+we interact with the software repositories provided by distributions by
+standardizing software component metadata.  It provides the foundation to build
+software-center applications, by providing metadata necessary for an
+application-centric view on package repositories.  It additionally provides
+specifications for things like an unified software metadata database, screenshot
+services and various other things needed to create user-friendly
+application-centers for distributions.")
+    (home-page "https://www.freedesktop.org/wiki/Distributions/AppStream/")
+    (license license:gpl2+)))
+
 (define-public farstream
   (package
     (name "farstream")
-- 
2.30.0


[-- Attachment #3: 0002-gnu-Add-nextcloud-desktop.patch --]
[-- Type: text/x-patch, Size: 6325 bytes --]

From b45173115d454b635d24952236d740bb3e28bdc6 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <rg@raghavgururajan.name>
Date: Fri, 15 Jan 2021 05:04:31 -0500
Subject: [PATCH 2/2] gnu: Add nextcloud-desktop.

* gnu/packages/nextcloud.scm: New module.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
* gnu/packages/nextcloud.scm (nextcloud-desktop): New variable.
---
 gnu/local.mk               |   1 +
 gnu/packages/nextcloud.scm | 134 +++++++++++++++++++++++++++++++++++++
 2 files changed, 135 insertions(+)
 create mode 100644 gnu/packages/nextcloud.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index 747cbb1da7..9c155fff73 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -398,6 +398,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/netpbm.scm			\
   %D%/packages/nettle.scm			\
   %D%/packages/networking.scm			\
+  %D%/packages/nextcloud.scm              \
   %D%/packages/nfs.scm                          \
   %D%/packages/nickle.scm                       \
   %D%/packages/nicotine.scm                     \
diff --git a/gnu/packages/nextcloud.scm b/gnu/packages/nextcloud.scm
new file mode 100644
index 0000000000..355bf3e930
--- /dev/null
+++ b/gnu/packages/nextcloud.scm
@@ -0,0 +1,134 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2021 Raghav Gururajan <rg@raghavgururajan.name>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages nextcloud)
+  #:use-module (gnu packages)
+  #:use-module (gnu packages check)
+  #:use-module (gnu packages compression)
+  #:use-module (gnu packages documentation)
+  #:use-module (gnu packages freedesktop)
+  #:use-module (gnu packages glib)
+  #:use-module (gnu packages gnome)
+  #:use-module (gnu packages graphviz)
+  #:use-module (gnu packages kde-frameworks)
+  #:use-module (gnu packages perl)
+  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages python)
+  #:use-module (gnu packages qt)
+  #:use-module (gnu packages ruby)
+  #:use-module (gnu packages sphinx)
+  #:use-module (gnu packages sqlite)
+  #:use-module (gnu packages tls)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix packages)
+  #:use-module (guix git-download)
+  #:use-module (guix build-system glib-or-gtk)
+  #:use-module (guix build-system qt))
+
+(define-public nextcloud-desktop
+  (package
+    (name "nextcloud-desktop")
+    (version "3.1.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://github.com/nextcloud/desktop.git")
+         (commit
+          (string-append "v" version))))
+       (file-name
+        (git-file-name name version))
+       (sha256
+        (base32 "1ba9z1kv3wlrmaxsn442vn0inzbd0smvq4xkavarn1h8i0dm62hb"))))
+    (build-system qt-build-system)
+    (arguments
+     `(#:configure-flags
+       (list
+        "-DUNIT_TESTING=ON")
+       #:imported-modules
+       (,@%qt-build-system-modules
+        (guix build glib-or-gtk-build-system))
+       #:modules
+       ((guix build qt-build-system)
+        ((guix build glib-or-gtk-build-system)
+         #:prefix glib-or-gtk:)
+        (guix build utils))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'remove-thirdparty
+           (lambda _
+             (with-directory-excursion "src/3rdparty"
+               (for-each delete-file-recursively
+                         (list
+                          "libcrashreporter-qt"
+                          "sqlite3")))
+             #t))
+         (add-after 'remove-thirdparty 'patch-plugin-dirs
+           (lambda* (#:key outputs #:allow-other-keys)
+             (substitute* "shell_integration/libcloudproviders/CMakeLists.txt"
+               (("PKGCONFIG_GETVAR\\(dbus-1 session_bus_services_dir _install_dir\\)")
+                "set(_install_dir \"${CMAKE_INSTALL_PREFIX}/share/dbus-1/services\")"))
+             (substitute* "shell_integration/dolphin/CMakeLists.txt"
+               (("ON CACHE")
+                "OFF CACHE"))
+             #t))
+         (add-before 'check 'pre-check
+           (lambda _
+             (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)))))
+    (native-inputs
+     `(("cmocka" ,cmocka)
+       ("dot" ,graphviz)
+       ("doxygen" ,doxygen)
+       ("extra-cmake-modules" ,extra-cmake-modules)
+       ("glib:bin" ,glib "bin")
+       ("perl" ,perl)
+       ("pkg-config" ,pkg-config)
+       ("python" ,python-wrapper)
+       ("qttools" ,qttools)
+       ("ruby" ,ruby)
+       ("sphinx" ,python-sphinx)))
+    (inputs
+     `(("appstream" ,appstream)
+       ("glib" ,glib)
+       ("kconfig" ,kconfig)
+       ("kcoreaddons" ,kcoreaddons)
+       ("kio" ,kio)
+       ("libcloudproviders" ,libcloudproviders)
+       ("openssl" ,openssl)
+       ("qtbase" ,qtbase)
+       ("qtdeclarative" ,qtdeclarative)
+       ("qtkeychain" ,qtkeychain)
+       ("qtquickcontrols2" ,qtquickcontrols2)
+       ("qtsvg" ,qtsvg)
+       ("qtwebchannel" ,qtwebchannel)
+       ("qtwebkit" ,qtwebkit)
+       ("sqlite" ,sqlite)
+       ("zlib" ,zlib)))
+    (propagated-inputs
+     `(("qtwebengine" ,qtwebengine)))
+    (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/install/#install-clients")
+    (license license:gpl2+)))
-- 
2.30.0


^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [bug#45889] Nextcloud Desktop (v4)
  2021-01-16 10:09 ` [bug#45889] Nextcloud Desktop (v4) Raghav Gururajan
@ 2021-01-16 10:48   ` Nicolò Balzarotti
  2021-01-16 14:42     ` Raghav Gururajan
  0 siblings, 1 reply; 44+ messages in thread
From: Nicolò Balzarotti @ 2021-01-16 10:48 UTC (permalink / raw)
  To: Raghav Gururajan, 45889

Raghav Gururajan <rg@raghavgururajan.name> writes:

Hi!
> Please find the attached patch-set to add Nextcloud desktop application 
> to guix.
I usually don't do patch review, so don't weight too much my comments.

Why is it placed inside a new module?  It should fit nicely in sync.scm

> +         (url "https://github.com/nextcloud/desktop.git")
.git shouldn't be needed

> +        (base32 "1ba9z1kv3wlrmaxsn442vn0inzbd0smvq4xkavarn1h8i0dm62hb"))))
This hash is wrong, I get 022k7b3c30dymrjc1g3ly2cac1c34gkqnvjya6p7w2j3qw2w1dm2

> +             (with-directory-excursion "src/3rdparty"
> +               (for-each delete-file-recursively
> +                         (list
> +                          "libcrashreporter-qt"
> +                          "sqlite3")))
This can be expressed in terms of what you you are keeping instead.

Something along the line of:

(let ((preserved-3rdparty-files
                '("QProgressIndicator" "qtlockedfile" "qtokenizer"
                  "qtsingleapplication" "kmessagewidget")))
           (with-directory-excursion "src/3rdparty"
             (for-each
              (lambda (directory)
                (simple-format #t "deleting: ~A\n" directory)
                (delete-file-recursively directory))
              (lset-difference string=?
                               (scandir ".")
                               (cons* "." ".." preserved-3rdparty-files))))
           #t)

> +         (add-after 'remove-thirdparty 'patch-plugin-dirs
> +           (lambda* (#:key outputs #:allow-other-keys)
> +             (substitute* "shell_integration/libcloudproviders/CMakeLists.txt"
> +               (("PKGCONFIG_GETVAR\\(dbus-1 session_bus_services_dir
> _install_dir\\)")
This line is too long, you can use something like
("PKGCONFIG_GETVAR\\(.*") instead.

> +                "set(_install_dir> \"${CMAKE_INSTALL_PREFIX}/share/dbus-1/services\")"))
Other long line, maybe string-append.

> +             (substitute* "shell_integration/dolphin/CMakeLists.txt"
> +               (("ON CACHE")
> +                "OFF CACHE"))
> +             #t))

Why?

> +         (add-before 'check 'pre-check
> +           (lambda _
> +             (setenv "HOME" (getcwd))
> +             #t))

It's missing a comment on why this is needed (like qttest tries to create
$HOME/.qttest/config/autostart/)
> +    (license license:gpl2+)))

Unbundled dependencies have different licenses
QprogressIndicator is under expat while others lgpl2.1+ if I'm not wrong

Also, I tried removing ruby and python-sphinx from the dependencies and
it did build fine, so be sure all of them are needed (or are they used
for some optional feature?).

Thanks




^ permalink raw reply	[flat|nested] 44+ messages in thread

* [bug#45889] Nextcloud Desktop (v5)
  2021-01-15 10:09 [bug#45889] Nextcloud Desktop Raghav Gururajan
                   ` (2 preceding siblings ...)
  2021-01-16 10:09 ` [bug#45889] Nextcloud Desktop (v4) Raghav Gururajan
@ 2021-01-16 14:34 ` Raghav Gururajan
  2021-01-17 14:44 ` [bug#45889] Nextcloud Client (v6) Raghav Gururajan
  2021-02-01 15:13 ` [bug#45889] Nextcloud Client (v7) Raghav Gururajan
  5 siblings, 0 replies; 44+ messages in thread
From: Raghav Gururajan @ 2021-01-16 14:34 UTC (permalink / raw)
  To: 45889

[-- Attachment #1: Type: text/plain, Size: 0 bytes --]



[-- Attachment #2: 0001-gnu-Add-appstream.patch --]
[-- Type: text/x-patch, Size: 5478 bytes --]

From 61c8855b31df21363a92e8b2bbf5d70ab977d874 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <rg@raghavgururajan.name>
Date: Thu, 14 Jan 2021 23:32:27 -0500
Subject: [PATCH 1/2] gnu: Add appstream.

* gnu/packages/freedesktop.scm (appstream): New variable.
---
 gnu/packages/freedesktop.scm | 96 ++++++++++++++++++++++++++++++++++++
 1 file changed, 96 insertions(+)

diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 6dd37005ae..a65cc9bd90 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -58,8 +58,10 @@
   #:use-module (gnu packages bash)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
+  #:use-module (gnu packages cmake)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages cryptsetup)
+  #:use-module (gnu packages databases)
   #:use-module (gnu packages disk)
   #:use-module (gnu packages docbook)
   #:use-module (gnu packages documentation)
@@ -75,6 +77,7 @@
   #:use-module (gnu packages gstreamer)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages image)
+  #:use-module (gnu packages language)
   #:use-module (gnu packages libffi)
   #:use-module (gnu packages libunwind)
   #:use-module (gnu packages libusb)
@@ -101,6 +104,99 @@
   #:use-module (gnu packages xorg)
   #:use-module (srfi srfi-1))
 
+(define-public appstream
+  (package
+    (name "appstream")
+    (version "0.13.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append "https://www.freedesktop.org/software/"
+                       "appstream/releases/"
+                       "AppStream-" version ".tar.xz"))
+       (sha256
+        (base32 "09l6ixz1w29pi0nb0flz14m4r3f2hpqpp1fq8y66v9xa4c9fczds"))))
+    (build-system meson-build-system)
+    (arguments
+     `(#:glib-or-gtk? #t
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-libstemmer
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "meson.build"
+               (("/usr/include")
+                (string-append (assoc-ref inputs "libstemmer")
+                               "/include")))
+             #t))
+         (add-after 'patch-libstemmer 'patch-docbook-xml
+           (lambda* (#:key inputs #:allow-other-keys)
+             (with-directory-excursion "docs/api"
+               (substitute* "appstream-docs.xml"
+                 (("http://www.oasis-open.org/docbook/xml/4.3/")
+                  (string-append (assoc-ref inputs "docbook-xml-4.3")
+                                 "/xml/dtd/docbook/"))))
+             (for-each (lambda (file)
+                         (substitute* file
+                           (("http://www.oasis-open.org/docbook/xml/4.5/")
+                            (string-append (assoc-ref inputs "docbook-xml")
+                                           "/xml/dtd/docbook/"))))
+                       (find-files "scripts/desc" "\\.xml$"))
+             #t))
+         (add-after 'patch-docbook-xml 'disable-failing-tests
+           (lambda _
+             (substitute* "tests/test-pool.c"
+               (("	g_test_add_func \\(\"/AppStream/PoolRead\", test_pool_read\\);")
+                "")
+               (("	g_test_add_func \\(\"/AppStream/PoolReadAsync\", test_pool_read_async\\);")
+                "")
+               (("	g_test_add_func \\(\"/AppStream/PoolEmpty\", test_pool_empty\\);")
+                "")
+               (("	g_test_add_func \\(\"/AppStream/Cache\", test_cache\\);")
+                "")
+               (("	g_test_add_func \\(\"/AppStream/Merges\", test_merge_components\\);")
+                ""))
+             #t))
+         (add-after 'disable-failing-tests 'patch-install-dir
+           (lambda* (#:key outputs #:allow-other-keys)
+             (substitute* "data/meson.build"
+               (("/etc")
+                (string-append (assoc-ref outputs "out")
+                               "/etc")))
+             #t)))))
+    (native-inputs
+     `(("cmake" ,cmake)
+       ("docbook-xml-4.3" ,docbook-xml-4.3)
+       ("docbook-xml" ,docbook-xml)
+       ("docbook-xsl" ,docbook-xsl)
+       ("gettext" ,gettext-minimal)
+       ("glib:bin" ,glib "bin")
+       ("gobject-introspection" ,gobject-introspection)
+       ("gperf" ,gperf)
+       ("gtk-doc" ,gtk-doc)
+       ("pkg-config" ,pkg-config)
+       ("python" ,python-wrapper)
+       ("xsltproc" ,libxslt)))
+    (inputs
+     `(("libsoup" ,libsoup)
+       ("libstemmer" ,libstemmer)
+       ("libxml2" ,libxml2)
+       ("libyaml" ,libyaml)
+       ("lmdb" ,lmdb)))
+    (propagated-inputs
+     `(("glib" ,glib)))
+    (synopsis "Tools and libraries to work with AppStream metadata")
+    (description "AppStream is a cross-distribution effort for enhancing the way
+we interact with the software repositories provided by distributions by
+standardizing software component metadata.  It provides the foundation to build
+software-center applications, by providing metadata necessary for an
+application-centric view on package repositories.  It additionally provides
+specifications for things like an unified software metadata database, screenshot
+services and various other things needed to create user-friendly
+application-centers for distributions.")
+    (home-page "https://www.freedesktop.org/wiki/Distributions/AppStream/")
+    (license license:gpl2+)))
+
 (define-public farstream
   (package
     (name "farstream")
-- 
2.30.0


[-- Attachment #3: 0002-gnu-Add-nextcloud-desktop.patch --]
[-- Type: text/x-patch, Size: 6986 bytes --]

From eebddbfb83bc58f05f8926deb197839c00133a33 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <rg@raghavgururajan.name>
Date: Fri, 15 Jan 2021 05:04:31 -0500
Subject: [PATCH 2/2] gnu: Add nextcloud-desktop.

* gnu/packages/nextcloud.scm: New module.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
* gnu/packages/nextcloud.scm (nextcloud-desktop): New variable.
---
 gnu/local.mk               |   1 +
 gnu/packages/nextcloud.scm | 148 +++++++++++++++++++++++++++++++++++++
 2 files changed, 149 insertions(+)
 create mode 100644 gnu/packages/nextcloud.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index 747cbb1da7..9c155fff73 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -398,6 +398,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/netpbm.scm			\
   %D%/packages/nettle.scm			\
   %D%/packages/networking.scm			\
+  %D%/packages/nextcloud.scm              \
   %D%/packages/nfs.scm                          \
   %D%/packages/nickle.scm                       \
   %D%/packages/nicotine.scm                     \
diff --git a/gnu/packages/nextcloud.scm b/gnu/packages/nextcloud.scm
new file mode 100644
index 0000000000..abf33cdc6b
--- /dev/null
+++ b/gnu/packages/nextcloud.scm
@@ -0,0 +1,148 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2021 Raghav Gururajan <rg@raghavgururajan.name>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages nextcloud)
+  #:use-module (gnu packages)
+  #:use-module (gnu packages check)
+  #:use-module (gnu packages compression)
+  #:use-module (gnu packages documentation)
+  #:use-module (gnu packages freedesktop)
+  #:use-module (gnu packages glib)
+  #:use-module (gnu packages gnome)
+  #:use-module (gnu packages graphviz)
+  #:use-module (gnu packages kde-frameworks)
+  #:use-module (gnu packages perl)
+  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages python)
+  #:use-module (gnu packages qt)
+  #:use-module (gnu packages ruby)
+  #:use-module (gnu packages sphinx)
+  #:use-module (gnu packages sqlite)
+  #:use-module (gnu packages tls)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix packages)
+  #:use-module (guix git-download)
+  #:use-module (guix build-system glib-or-gtk)
+  #:use-module (guix build-system qt))
+
+(define-public nextcloud-desktop
+  (package
+    (name "nextcloud-desktop")
+    (version "3.1.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://github.com/nextcloud/desktop")
+         (commit
+          (string-append "v" version))))
+       (file-name
+        (git-file-name name version))
+       (sha256
+        (base32 "022k7b3c30dymrjc1g3ly2cac1c34gkqnvjya6p7w2j3qw2w1dm2"))))
+    (build-system qt-build-system)
+    (arguments
+     `(#:configure-flags
+       (list
+        "-DUNIT_TESTING=ON")
+       #:imported-modules
+       (,@%qt-build-system-modules
+        (guix build glib-or-gtk-build-system))
+       #:modules
+       ((guix build qt-build-system)
+        ((guix build glib-or-gtk-build-system)
+         #:prefix glib-or-gtk:)
+        (guix build utils))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'remove-thirdparty
+           (lambda _
+             (with-directory-excursion "src/3rdparty"
+               (for-each delete-file-recursively
+                         ;; Keep QProgressIndicator, KMessageWidget
+                         ;; QtLockedFile, Qtokenizer and QtSingleApplication,
+                         ;; as they are not available in Guix.
+                         ;; LibCrashReporter-Qt has it's own bundled 3rdparty stuff.
+                         ;; SQLite is available in Guix.
+                         (list
+                          "libcrashreporter-qt"
+                          "sqlite3")))
+             #t))
+         (add-after 'remove-thirdparty 'patch-plugin-dirs
+           (lambda* (#:key outputs #:allow-other-keys)
+             ;; Patch install directory for dbus service files.
+             (substitute* "shell_integration/libcloudproviders/CMakeLists.txt"
+               (("PKGCONFIG_GETVAR\\(dbus-1 session_bus_services_dir _install_dir\\)")
+                "set(_install_dir \"${CMAKE_INSTALL_PREFIX}/share/dbus-1/services\")"))
+             ;; Turn-off the use of absolute Qt paths for installation.
+             (substitute* "shell_integration/dolphin/CMakeLists.txt"
+               (("ON CACHE")
+                "OFF CACHE"))
+             #t))
+         (add-before 'check 'pre-check
+           (lambda _
+             ;; 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)))))
+    (native-inputs
+     `(("cmocka" ,cmocka)
+       ("dot" ,graphviz)
+       ("doxygen" ,doxygen)
+       ("extra-cmake-modules" ,extra-cmake-modules)
+       ("glib:bin" ,glib "bin")
+       ("perl" ,perl)
+       ("pkg-config" ,pkg-config)
+       ("python" ,python-wrapper)
+       ("qttools" ,qttools)
+       ("ruby" ,ruby)))
+    (inputs
+     `(("appstream" ,appstream)
+       ("glib" ,glib)
+       ("kconfig" ,kconfig)
+       ("kcoreaddons" ,kcoreaddons)
+       ("kio" ,kio)
+       ("libcloudproviders" ,libcloudproviders)
+       ("openssl" ,openssl)
+       ("qtbase" ,qtbase)
+       ("qtdeclarative" ,qtdeclarative)
+       ("qtkeychain" ,qtkeychain)
+       ("qtquickcontrols2" ,qtquickcontrols2)
+       ("qtsvg" ,qtsvg)
+       ("qtwebchannel" ,qtwebchannel)
+       ("qtwebkit" ,qtwebkit)
+       ("sqlite" ,sqlite)
+       ("zlib" ,zlib)))
+    (propagated-inputs
+     `(("qtwebengine" ,qtwebengine)))
+    (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/install/#install-clients")
+    (license
+     (list
+      ;; QtProgressIndicator
+      license:expat
+      ;; All ThirdParty (except QtProgressIndicator)
+      license:lgpl2.1+
+      ;; Others
+      license:gpl2+))))
-- 
2.30.0


^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [bug#45889] Nextcloud Desktop (v4)
  2021-01-16 10:48   ` Nicolò Balzarotti
@ 2021-01-16 14:42     ` Raghav Gururajan
  0 siblings, 0 replies; 44+ messages in thread
From: Raghav Gururajan @ 2021-01-16 14:42 UTC (permalink / raw)
  To: Nicolò Balzarotti, 45889

Hi Nicolò!

> Why is it placed inside a new module?  It should fit nicely in sync.scm

Nextcloud is a big project. There will be other packages like server, 
plugins etc., which can then be added to this module. Concept is similar 
to linphone.scm.

> .git shouldn't be needed

Updated in v5.

> This hash is wrong, I get 022k7b3c30dymrjc1g3ly2cac1c34gkqnvjya6p7w2j3qw2w1dm2

Updated in v5.

> Something along the line of:
> 
> (let ((preserved-3rdparty-files
>                  '("QProgressIndicator" "qtlockedfile" "qtokenizer"
>                    "qtsingleapplication" "kmessagewidget")))
>             (with-directory-excursion "src/3rdparty"
>               (for-each
>                (lambda (directory)
>                  (simple-format #t "deleting: ~A\n" directory)
>                  (delete-file-recursively directory))
>                (lset-difference string=?
>                                 (scandir ".")
>                                 (cons* "." ".." preserved-3rdparty-files))))
>             #t)

The snippet didn't work, but I added comments in v5.

> This line is too long, you can use something like
> ("PKGCONFIG_GETVAR\\(.*") instead.

If I use this, it causes parsing error.

> Other long line, maybe string-append.

Ah, I have been advised before not to break lines like this via 
string-append.

> Why?

Added comments in v5.

> It's missing a comment on why this is needed (like qttest tries to create
> $HOME/.qttest/config/autostart/)
>> +    (license license:gpl2+)))

Added comments in v5.

> Unbundled dependencies have different licenses
> QprogressIndicator is under expat while others lgpl2.1+ if I'm not wrong

Updated in v5.

> Also, I tried removing ruby and python-sphinx from the dependencies and
> it did build fine, so be sure all of them are needed (or are they used
> for some optional feature?).

Ruby is for patch-shebangs phase. Sphinx was looked for during configure 
phase, but doesn't seem to do anything, so I removed it in v5.

Thanks so much for the review. :-)

Regards,
RG.




^ permalink raw reply	[flat|nested] 44+ messages in thread

* [bug#45889] Nextcloud Client (v6)
  2021-01-15 10:09 [bug#45889] Nextcloud Desktop Raghav Gururajan
                   ` (3 preceding siblings ...)
  2021-01-16 14:34 ` [bug#45889] Nextcloud Desktop (v5) Raghav Gururajan
@ 2021-01-17 14:44 ` Raghav Gururajan
  2021-01-24 18:45   ` david larsson
  2021-02-01 15:13 ` [bug#45889] Nextcloud Client (v7) Raghav Gururajan
  5 siblings, 1 reply; 44+ messages in thread
From: Raghav Gururajan @ 2021-01-17 14:44 UTC (permalink / raw)
  To: 45889

[-- Attachment #1: Type: text/plain, Size: 0 bytes --]



[-- Attachment #2: 0015-gnu-Add-nextcloud-client.patch --]
[-- Type: text/x-patch, Size: 6938 bytes --]

From 0f643d59bd13b07175dce772d922f216456d9025 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <rg@raghavgururajan.name>
Date: Fri, 15 Jan 2021 05:04:31 -0500
Subject: [PATCH 15/15] gnu: Add nextcloud-client.

* gnu/packages/nextcloud.scm: New module.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
* gnu/packages/nextcloud.scm (nextcloud-client): New variable.
---
 gnu/local.mk               |   1 +
 gnu/packages/nextcloud.scm | 149 +++++++++++++++++++++++++++++++++++++
 2 files changed, 150 insertions(+)
 create mode 100644 gnu/packages/nextcloud.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index 747cbb1da7..9c155fff73 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -398,6 +398,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/netpbm.scm			\
   %D%/packages/nettle.scm			\
   %D%/packages/networking.scm			\
+  %D%/packages/nextcloud.scm              \
   %D%/packages/nfs.scm                          \
   %D%/packages/nickle.scm                       \
   %D%/packages/nicotine.scm                     \
diff --git a/gnu/packages/nextcloud.scm b/gnu/packages/nextcloud.scm
new file mode 100644
index 0000000000..1f0906470e
--- /dev/null
+++ b/gnu/packages/nextcloud.scm
@@ -0,0 +1,149 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2021 Raghav Gururajan <rg@raghavgururajan.name>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages nextcloud)
+  #:use-module (gnu packages)
+  #:use-module (gnu packages check)
+  #:use-module (gnu packages compression)
+  #:use-module (gnu packages documentation)
+  #:use-module (gnu packages freedesktop)
+  #:use-module (gnu packages glib)
+  #:use-module (gnu packages gnome)
+  #:use-module (gnu packages graphviz)
+  #:use-module (gnu packages kde-frameworks)
+  #:use-module (gnu packages perl)
+  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages python)
+  #:use-module (gnu packages qt)
+  #:use-module (gnu packages ruby)
+  #:use-module (gnu packages sphinx)
+  #:use-module (gnu packages sqlite)
+  #:use-module (gnu packages tls)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix packages)
+  #:use-module (guix git-download)
+  #:use-module (guix build-system glib-or-gtk)
+  #:use-module (guix build-system qt))
+
+(define-public nextcloud-client
+  (package
+    (name "nextcloud-client")
+    (version "3.1.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://github.com/nextcloud/desktop")
+         (commit
+          (string-append "v" version))))
+       (file-name
+        (git-file-name name version))
+       (sha256
+        (base32 "022k7b3c30dymrjc1g3ly2cac1c34gkqnvjya6p7w2j3qw2w1dm2"))
+       (modules '((guix build utils)
+                  (ice-9 ftw)
+                  (srfi srfi-1)))
+       (snippet
+        `(begin
+           (let ((keep '( ;; Not available in Guix.
+                         "QProgressIndicator" "kmessagewidget" "qtlockedfile"
+                         "qtokenizer" "qtsingleapplication")))
+             (with-directory-excursion "src/3rdparty"
+               (for-each delete-file-recursively
+                         (lset-difference string=?
+                                          (scandir ".")
+                                          (cons* "." ".." keep))))
+             #t)))))
+    (build-system qt-build-system)
+    (arguments
+     `(#:configure-flags
+       (list
+        "-DUNIT_TESTING=ON")
+       #:imported-modules
+       (,@%qt-build-system-modules
+        (guix build glib-or-gtk-build-system))
+       #:modules
+       ((guix build qt-build-system)
+        ((guix build glib-or-gtk-build-system)
+         #:prefix glib-or-gtk:)
+        (guix build utils))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-plugin-dirs
+           (lambda* (#:key outputs #:allow-other-keys)
+             ;; Patch install directory for dbus service files.
+             (substitute* "shell_integration/libcloudproviders/CMakeLists.txt"
+               (("PKGCONFIG_GETVAR\\(dbus-1 session_bus_services_dir _install_dir\\)")
+                "set(_install_dir \"${CMAKE_INSTALL_PREFIX}/share/dbus-1/services\")"))
+             ;; Turn-off the use of absolute Qt paths for installation.
+             (substitute* "shell_integration/dolphin/CMakeLists.txt"
+               (("ON CACHE")
+                "OFF CACHE"))
+             #t))
+         (add-before 'check 'pre-check
+           (lambda _
+             ;; 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)))))
+    (native-inputs
+     `(("cmocka" ,cmocka)
+       ("dot" ,graphviz)
+       ("doxygen" ,doxygen)
+       ("extra-cmake-modules" ,extra-cmake-modules)
+       ("glib:bin" ,glib "bin")
+       ("perl" ,perl)
+       ("pkg-config" ,pkg-config)
+       ("python" ,python-wrapper)
+       ("qttools" ,qttools)
+       ("ruby" ,ruby)))
+    (inputs
+     `(("appstream" ,appstream)
+       ("glib" ,glib)
+       ("kconfig" ,kconfig)
+       ("kcoreaddons" ,kcoreaddons)
+       ("kio" ,kio)
+       ("libcloudproviders" ,libcloudproviders)
+       ("openssl" ,openssl)
+       ("qtbase" ,qtbase)
+       ("qtdeclarative" ,qtdeclarative)
+       ("qtkeychain" ,qtkeychain)
+       ("qtquickcontrols2" ,qtquickcontrols2)
+       ("qtsvg" ,qtsvg)
+       ("qtwebchannel" ,qtwebchannel)
+       ("qtwebkit" ,qtwebkit)
+       ("sqlite" ,sqlite)
+       ("zlib" ,zlib)))
+    (propagated-inputs
+     `(("qtwebengine" ,qtwebengine)))
+    (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/install/#install-clients")
+    (license
+     (list
+      ;; QtProgressIndicator
+      license:expat
+      ;; All ThirdParty (except QtProgressIndicator)
+      license:lgpl2.1+
+      ;; Others
+      license:gpl2+))))
-- 
2.30.0


[-- Attachment #3: 0014-gnu-Add-appstream.patch --]
[-- Type: text/x-patch, Size: 5480 bytes --]

From 4865aa2f435817a0cbcaddf1c75459894a63bb82 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <rg@raghavgururajan.name>
Date: Thu, 14 Jan 2021 23:32:27 -0500
Subject: [PATCH 14/15] gnu: Add appstream.

* gnu/packages/freedesktop.scm (appstream): New variable.
---
 gnu/packages/freedesktop.scm | 96 ++++++++++++++++++++++++++++++++++++
 1 file changed, 96 insertions(+)

diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 6dd37005ae..a65cc9bd90 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -58,8 +58,10 @@
   #:use-module (gnu packages bash)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
+  #:use-module (gnu packages cmake)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages cryptsetup)
+  #:use-module (gnu packages databases)
   #:use-module (gnu packages disk)
   #:use-module (gnu packages docbook)
   #:use-module (gnu packages documentation)
@@ -75,6 +77,7 @@
   #:use-module (gnu packages gstreamer)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages image)
+  #:use-module (gnu packages language)
   #:use-module (gnu packages libffi)
   #:use-module (gnu packages libunwind)
   #:use-module (gnu packages libusb)
@@ -101,6 +104,99 @@
   #:use-module (gnu packages xorg)
   #:use-module (srfi srfi-1))
 
+(define-public appstream
+  (package
+    (name "appstream")
+    (version "0.13.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append "https://www.freedesktop.org/software/"
+                       "appstream/releases/"
+                       "AppStream-" version ".tar.xz"))
+       (sha256
+        (base32 "09l6ixz1w29pi0nb0flz14m4r3f2hpqpp1fq8y66v9xa4c9fczds"))))
+    (build-system meson-build-system)
+    (arguments
+     `(#:glib-or-gtk? #t
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-libstemmer
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "meson.build"
+               (("/usr/include")
+                (string-append (assoc-ref inputs "libstemmer")
+                               "/include")))
+             #t))
+         (add-after 'patch-libstemmer 'patch-docbook-xml
+           (lambda* (#:key inputs #:allow-other-keys)
+             (with-directory-excursion "docs/api"
+               (substitute* "appstream-docs.xml"
+                 (("http://www.oasis-open.org/docbook/xml/4.3/")
+                  (string-append (assoc-ref inputs "docbook-xml-4.3")
+                                 "/xml/dtd/docbook/"))))
+             (for-each (lambda (file)
+                         (substitute* file
+                           (("http://www.oasis-open.org/docbook/xml/4.5/")
+                            (string-append (assoc-ref inputs "docbook-xml")
+                                           "/xml/dtd/docbook/"))))
+                       (find-files "scripts/desc" "\\.xml$"))
+             #t))
+         (add-after 'patch-docbook-xml 'disable-failing-tests
+           (lambda _
+             (substitute* "tests/test-pool.c"
+               (("	g_test_add_func \\(\"/AppStream/PoolRead\", test_pool_read\\);")
+                "")
+               (("	g_test_add_func \\(\"/AppStream/PoolReadAsync\", test_pool_read_async\\);")
+                "")
+               (("	g_test_add_func \\(\"/AppStream/PoolEmpty\", test_pool_empty\\);")
+                "")
+               (("	g_test_add_func \\(\"/AppStream/Cache\", test_cache\\);")
+                "")
+               (("	g_test_add_func \\(\"/AppStream/Merges\", test_merge_components\\);")
+                ""))
+             #t))
+         (add-after 'disable-failing-tests 'patch-install-dir
+           (lambda* (#:key outputs #:allow-other-keys)
+             (substitute* "data/meson.build"
+               (("/etc")
+                (string-append (assoc-ref outputs "out")
+                               "/etc")))
+             #t)))))
+    (native-inputs
+     `(("cmake" ,cmake)
+       ("docbook-xml-4.3" ,docbook-xml-4.3)
+       ("docbook-xml" ,docbook-xml)
+       ("docbook-xsl" ,docbook-xsl)
+       ("gettext" ,gettext-minimal)
+       ("glib:bin" ,glib "bin")
+       ("gobject-introspection" ,gobject-introspection)
+       ("gperf" ,gperf)
+       ("gtk-doc" ,gtk-doc)
+       ("pkg-config" ,pkg-config)
+       ("python" ,python-wrapper)
+       ("xsltproc" ,libxslt)))
+    (inputs
+     `(("libsoup" ,libsoup)
+       ("libstemmer" ,libstemmer)
+       ("libxml2" ,libxml2)
+       ("libyaml" ,libyaml)
+       ("lmdb" ,lmdb)))
+    (propagated-inputs
+     `(("glib" ,glib)))
+    (synopsis "Tools and libraries to work with AppStream metadata")
+    (description "AppStream is a cross-distribution effort for enhancing the way
+we interact with the software repositories provided by distributions by
+standardizing software component metadata.  It provides the foundation to build
+software-center applications, by providing metadata necessary for an
+application-centric view on package repositories.  It additionally provides
+specifications for things like an unified software metadata database, screenshot
+services and various other things needed to create user-friendly
+application-centers for distributions.")
+    (home-page "https://www.freedesktop.org/wiki/Distributions/AppStream/")
+    (license license:gpl2+)))
+
 (define-public farstream
   (package
     (name "farstream")
-- 
2.30.0


^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [bug#45889] Nextcloud Client (v6)
  2021-01-17 14:44 ` [bug#45889] Nextcloud Client (v6) Raghav Gururajan
@ 2021-01-24 18:45   ` david larsson
  2021-02-01 15:07     ` Raghav Gururajan
  0 siblings, 1 reply; 44+ messages in thread
From: david larsson @ 2021-01-24 18:45 UTC (permalink / raw)
  To: Raghav Gururajan; +Cc: Guix-patches, 45889

On 2021-01-17 15:44, Raghav Gururajan wrote:
> 

Hi,

Thank you for working on this! I have tried to package this myself but 
haven't much success beyond being able to login and sync things and to 
receive notifications via libnotify. However, this patch also doesn't 
succeeed in a fully functional nextcloud-desktop, yet - though I hope 
you do succeed!

I tried this out, and started it with --log-window (or similar) and it 
complained about qt-graphical-effect, so I suggest you add it to 
propagated-inputs to have that error go away. And as a general tip - 
start nextcloud-desktop with the log-window flag.

I wish you best of luck in completing it!

Best regards,
David




^ permalink raw reply	[flat|nested] 44+ messages in thread

* [bug#45889] Nextcloud Client (v6)
  2021-01-24 18:45   ` david larsson
@ 2021-02-01 15:07     ` Raghav Gururajan
  0 siblings, 0 replies; 44+ messages in thread
From: Raghav Gururajan @ 2021-02-01 15:07 UTC (permalink / raw)
  To: david larsson; +Cc: Guix-patches, 45889


[-- Attachment #1.1.1: Type: text/plain, Size: 942 bytes --]

Hi David!

> Thank you for working on this! I have tried to package this myself but 
> haven't much success beyond being able to login and sync things and to 
> receive notifications via libnotify. However, this patch also doesn't 
> succeeed in a fully functional nextcloud-desktop, yet - though I hope 
> you do succeed!

I can confirm that this patch-set is functional. I haven't faced any 
issues. Please let me know which function(s) didn't work for you. I'll 
look into them. :-)

> I tried this out, and started it with --log-window (or similar) and it 
> complained about qt-graphical-effect, so I suggest you add it to 
> propagated-inputs to have that error go away. And as a general tip - 
> start nextcloud-desktop with the log-window flag.

Ah thanks! Yeah, it needed qtgraphicaleffects. Added them in v7. Also, 
the application excepts that the system runs either gnome-keyring or 
kwallet.

Regards,
RG.

[-- Attachment #1.1.2: OpenPGP_0x5F5816647F8BE551.asc --]
[-- Type: application/pgp-keys, Size: 2649 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

^ permalink raw reply	[flat|nested] 44+ messages in thread

* [bug#45889] Nextcloud Client (v7)
  2021-01-15 10:09 [bug#45889] Nextcloud Desktop Raghav Gururajan
                   ` (4 preceding siblings ...)
  2021-01-17 14:44 ` [bug#45889] Nextcloud Client (v6) Raghav Gururajan
@ 2021-02-01 15:13 ` Raghav Gururajan
  2021-02-09 10:22   ` Leo Prikler
  2021-02-09 12:53   ` [bug#45889] Nextcloud Client (v7) Leo Prikler
  5 siblings, 2 replies; 44+ messages in thread
From: Raghav Gururajan @ 2021-02-01 15:13 UTC (permalink / raw)
  To: 45889


[-- Attachment #1.1.1: Type: text/plain, Size: 0 bytes --]



[-- Attachment #1.1.2: 0001-gnu-Add-appstream.patch --]
[-- Type: text/x-patch, Size: 5614 bytes --]

From 96567208d08fc5692d721bb54488b7261eba3396 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <rg@raghavgururajan.name>
Date: Thu, 14 Jan 2021 23:32:27 -0500
Subject: [PATCH 1/3] gnu: Add appstream.

* gnu/packages/freedesktop.scm (appstream): New variable.
---
 gnu/packages/freedesktop.scm | 96 ++++++++++++++++++++++++++++++++++++
 1 file changed, 96 insertions(+)

diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 09db6de783..921094f6de 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -58,8 +58,10 @@
   #:use-module (gnu packages bash)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
+  #:use-module (gnu packages cmake)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages cryptsetup)
+  #:use-module (gnu packages databases)
   #:use-module (gnu packages disk)
   #:use-module (gnu packages docbook)
   #:use-module (gnu packages documentation)
@@ -75,6 +77,7 @@
   #:use-module (gnu packages gstreamer)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages image)
+  #:use-module (gnu packages language)
   #:use-module (gnu packages libffi)
   #:use-module (gnu packages libunwind)
   #:use-module (gnu packages libusb)
@@ -101,6 +104,99 @@
   #:use-module (gnu packages xorg)
   #:use-module (srfi srfi-1))
 
+(define-public appstream
+  (package
+    (name "appstream")
+    (version "0.13.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append "https://www.freedesktop.org/software/"
+                       "appstream/releases/"
+                       "AppStream-" version ".tar.xz"))
+       (sha256
+        (base32 "09l6ixz1w29pi0nb0flz14m4r3f2hpqpp1fq8y66v9xa4c9fczds"))))
+    (build-system meson-build-system)
+    (arguments
+     `(#:glib-or-gtk? #t
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-libstemmer
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "meson.build"
+               (("/usr/include")
+                (string-append (assoc-ref inputs "libstemmer")
+                               "/include")))
+             #t))
+         (add-after 'patch-libstemmer 'patch-docbook-xml
+           (lambda* (#:key inputs #:allow-other-keys)
+             (with-directory-excursion "docs/api"
+               (substitute* "appstream-docs.xml"
+                 (("http://www.oasis-open.org/docbook/xml/4.3/")
+                  (string-append (assoc-ref inputs "docbook-xml-4.3")
+                                 "/xml/dtd/docbook/"))))
+             (for-each (lambda (file)
+                         (substitute* file
+                           (("http://www.oasis-open.org/docbook/xml/4.5/")
+                            (string-append (assoc-ref inputs "docbook-xml")
+                                           "/xml/dtd/docbook/"))))
+                       (find-files "scripts/desc" "\\.xml$"))
+             #t))
+         (add-after 'patch-docbook-xml 'disable-failing-tests
+           (lambda _
+             (substitute* "tests/test-pool.c"
+               (("	g_test_add_func \\(\"/AppStream/PoolRead\", test_pool_read\\);")
+                "")
+               (("	g_test_add_func \\(\"/AppStream/PoolReadAsync\", test_pool_read_async\\);")
+                "")
+               (("	g_test_add_func \\(\"/AppStream/PoolEmpty\", test_pool_empty\\);")
+                "")
+               (("	g_test_add_func \\(\"/AppStream/Cache\", test_cache\\);")
+                "")
+               (("	g_test_add_func \\(\"/AppStream/Merges\", test_merge_components\\);")
+                ""))
+             #t))
+         (add-after 'disable-failing-tests 'patch-install-dir
+           (lambda* (#:key outputs #:allow-other-keys)
+             (substitute* "data/meson.build"
+               (("/etc")
+                (string-append (assoc-ref outputs "out")
+                               "/etc")))
+             #t)))))
+    (native-inputs
+     `(("cmake" ,cmake)
+       ("docbook-xml-4.3" ,docbook-xml-4.3)
+       ("docbook-xml" ,docbook-xml)
+       ("docbook-xsl" ,docbook-xsl)
+       ("gettext" ,gettext-minimal)
+       ("glib:bin" ,glib "bin")
+       ("gobject-introspection" ,gobject-introspection)
+       ("gperf" ,gperf)
+       ("gtk-doc" ,gtk-doc)
+       ("pkg-config" ,pkg-config)
+       ("python" ,python-wrapper)
+       ("xsltproc" ,libxslt)))
+    (inputs
+     `(("libsoup" ,libsoup)
+       ("libstemmer" ,libstemmer)
+       ("libxml2" ,libxml2)
+       ("libyaml" ,libyaml)
+       ("lmdb" ,lmdb)))
+    (propagated-inputs
+     `(("glib" ,glib)))
+    (synopsis "Tools and libraries to work with AppStream metadata")
+    (description "AppStream is a cross-distribution effort for enhancing the way
+we interact with the software repositories provided by distributions by
+standardizing software component metadata.  It provides the foundation to build
+software-center applications, by providing metadata necessary for an
+application-centric view on package repositories.  It additionally provides
+specifications for things like an unified software metadata database, screenshot
+services and various other things needed to create user-friendly
+application-centers for distributions.")
+    (home-page "https://www.freedesktop.org/wiki/Distributions/AppStream/")
+    (license license:gpl2+)))
+
 (define-public farstream
   (package
     (name "farstream")
-- 
2.30.0


[-- Attachment #1.1.3: 0002-gnu-kwayland-Disable-failing-tests.patch --]
[-- Type: text/x-patch, Size: 1186 bytes --]

From 1f8ae09541505a39e2e011bce6fb6fdf12a5bde7 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <rg@raghavgururajan.name>
Date: Sat, 30 Jan 2021 11:42:12 -0500
Subject: [PATCH 2/3] gnu: kwayland: Disable failing tests.

* gnu/packages/kde-frameworks.scm (kwayland) [arguments]<#:phases>
['disable-failing-tests]: New phase.
---
 gnu/packages/kde-frameworks.scm | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/gnu/packages/kde-frameworks.scm b/gnu/packages/kde-frameworks.scm
index 8c2028b978..cf5840f3f3 100644
--- a/gnu/packages/kde-frameworks.scm
+++ b/gnu/packages/kde-frameworks.scm
@@ -1049,6 +1049,12 @@ integration with a custom editor as well as a ready-to-use
     (arguments
      `(#:phases
        (modify-phases %standard-phases
+         (add-after 'unpack 'disable-failing-tests
+           (lambda _
+             (substitute* "autotests/client/CMakeLists.txt"
+               (("    add_test\\(NAME kwayland-testPlasmaWindowModel COMMAND testPlasmaWindowModel\\)")
+                ""))
+             #t))
          (add-before 'check 'check-setup
            (lambda _
              (setenv "XDG_RUNTIME_DIR" "/tmp")
-- 
2.30.0


[-- Attachment #1.1.4: 0003-gnu-Add-nextcloud-client.patch --]
[-- Type: text/x-patch, Size: 7172 bytes --]

From d8d102622331390726068dc6f82acf23ebb97734 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <rg@raghavgururajan.name>
Date: Fri, 15 Jan 2021 05:04:31 -0500
Subject: [PATCH 3/3] gnu: Add nextcloud-client.

* gnu/packages/nextcloud.scm: New module.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
* gnu/packages/nextcloud.scm (nextcloud-client): New variable.
---
 gnu/local.mk               |   1 +
 gnu/packages/nextcloud.scm | 150 +++++++++++++++++++++++++++++++++++++
 2 files changed, 151 insertions(+)
 create mode 100644 gnu/packages/nextcloud.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index 6679b6fb17..d1b3c1699f 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -398,6 +398,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/netpbm.scm			\
   %D%/packages/nettle.scm			\
   %D%/packages/networking.scm			\
+  %D%/packages/nextcloud.scm              \
   %D%/packages/nfs.scm                          \
   %D%/packages/nickle.scm                       \
   %D%/packages/nicotine.scm                     \
diff --git a/gnu/packages/nextcloud.scm b/gnu/packages/nextcloud.scm
new file mode 100644
index 0000000000..7c04cfcc91
--- /dev/null
+++ b/gnu/packages/nextcloud.scm
@@ -0,0 +1,150 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2021 Raghav Gururajan <rg@raghavgururajan.name>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages nextcloud)
+  #:use-module (gnu packages)
+  #:use-module (gnu packages check)
+  #:use-module (gnu packages compression)
+  #:use-module (gnu packages documentation)
+  #:use-module (gnu packages freedesktop)
+  #:use-module (gnu packages glib)
+  #:use-module (gnu packages gnome)
+  #:use-module (gnu packages graphviz)
+  #:use-module (gnu packages kde-frameworks)
+  #:use-module (gnu packages perl)
+  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages python)
+  #:use-module (gnu packages qt)
+  #:use-module (gnu packages ruby)
+  #:use-module (gnu packages sphinx)
+  #:use-module (gnu packages sqlite)
+  #:use-module (gnu packages tls)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix packages)
+  #:use-module (guix git-download)
+  #:use-module (guix build-system glib-or-gtk)
+  #:use-module (guix build-system qt))
+
+(define-public nextcloud-client
+  (package
+    (name "nextcloud-client")
+    (version "3.1.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://github.com/nextcloud/desktop")
+         (commit
+          (string-append "v" version))))
+       (file-name
+        (git-file-name name version))
+       (sha256
+        (base32 "022k7b3c30dymrjc1g3ly2cac1c34gkqnvjya6p7w2j3qw2w1dm2"))
+       (modules '((guix build utils)
+                  (ice-9 ftw)
+                  (srfi srfi-1)))
+       (snippet
+        `(begin
+           (let ((keep '( ;; Not available in Guix.
+                         "QProgressIndicator" "kmessagewidget" "qtlockedfile"
+                         "qtokenizer" "qtsingleapplication")))
+             (with-directory-excursion "src/3rdparty"
+               (for-each delete-file-recursively
+                         (lset-difference string=?
+                                          (scandir ".")
+                                          (cons* "." ".." keep))))
+             #t)))))
+    (build-system qt-build-system)
+    (arguments
+     `(#:configure-flags
+       (list
+        "-DUNIT_TESTING=ON")
+       #:imported-modules
+       (,@%qt-build-system-modules
+        (guix build glib-or-gtk-build-system))
+       #:modules
+       ((guix build qt-build-system)
+        ((guix build glib-or-gtk-build-system)
+         #:prefix glib-or-gtk:)
+        (guix build utils))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-plugin-dirs
+           (lambda* (#:key outputs #:allow-other-keys)
+             ;; Patch install directory for dbus service files.
+             (substitute* "shell_integration/libcloudproviders/CMakeLists.txt"
+               (("PKGCONFIG_GETVAR\\(dbus-1 session_bus_services_dir _install_dir\\)")
+                "set(_install_dir \"${CMAKE_INSTALL_PREFIX}/share/dbus-1/services\")"))
+             ;; Turn-off the use of absolute Qt paths for installation.
+             (substitute* "shell_integration/dolphin/CMakeLists.txt"
+               (("ON CACHE")
+                "OFF CACHE"))
+             #t))
+         (add-before 'check 'pre-check
+           (lambda _
+             ;; 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)))))
+    (native-inputs
+     `(("cmocka" ,cmocka)
+       ("dot" ,graphviz)
+       ("doxygen" ,doxygen)
+       ("extra-cmake-modules" ,extra-cmake-modules)
+       ("glib:bin" ,glib "bin")
+       ("perl" ,perl)
+       ("pkg-config" ,pkg-config)
+       ("python" ,python-wrapper)
+       ("qttools" ,qttools)
+       ("ruby" ,ruby)))
+    (inputs
+     `(("appstream" ,appstream)
+       ("glib" ,glib)
+       ("kconfig" ,kconfig)
+       ("kcoreaddons" ,kcoreaddons)
+       ("kio" ,kio)
+       ("libcloudproviders" ,libcloudproviders)
+       ("openssl" ,openssl)
+       ("qtbase" ,qtbase)
+       ("qtdeclarative" ,qtdeclarative)
+       ("qtgraphicaleffects" ,qtgraphicaleffects)
+       ("qtkeychain" ,qtkeychain)
+       ("qtquickcontrols2" ,qtquickcontrols2)
+       ("qtsvg" ,qtsvg)
+       ("qtwebchannel" ,qtwebchannel)
+       ("qtwebkit" ,qtwebkit)
+       ("sqlite" ,sqlite)
+       ("zlib" ,zlib)))
+    (propagated-inputs
+     `(("qtwebengine" ,qtwebengine)))
+    (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/install/#install-clients")
+    (license
+     (list
+      ;; QtProgressIndicator
+      license:expat
+      ;; All ThirdParty (except QtProgressIndicator)
+      license:lgpl2.1+
+      ;; Others
+      license:gpl2+))))
-- 
2.30.0


[-- Attachment #1.1.5: OpenPGP_0x5F5816647F8BE551.asc --]
[-- Type: application/pgp-keys, Size: 2649 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [bug#45889] Nextcloud Client (v7)
  2021-02-01 15:13 ` [bug#45889] Nextcloud Client (v7) Raghav Gururajan
@ 2021-02-09 10:22   ` Leo Prikler
  2021-02-13 20:36     ` [bug#45889] Nextcloud Client (v8) Raghav Gururajan
  2021-02-09 12:53   ` [bug#45889] Nextcloud Client (v7) Leo Prikler
  1 sibling, 1 reply; 44+ messages in thread
From: Leo Prikler @ 2021-02-09 10:22 UTC (permalink / raw)
  To: Raghav Gururajan, 45889

Hello,

Am Montag, den 01.02.2021, 10:13 -0500 schrieb Raghav Gururajan:
> Subject: [PATCH 1/3] gnu: Add appstream.
Mostly LGTM.

> +    (native-inputs
> +     `(("cmake" ,cmake)
Is cmake really needed?  I know that meson falls back to cmake if pkg-
config fails and also supports output to cmake, but meson/ninja should
be the default.

> Subject: [PATCH 2/3] gnu: kwayland: Disable failing tests.
LGTM, we might want to push that independently.

> +           (let ((keep '( ;; Not available in Guix.
> +                         "QProgressIndicator" "kmessagewidget"
> "qtlockedfile"
> +                         "qtokenizer" "qtsingleapplication")))
Could you try packaging those for Guix as well?

> +       #:imported-modules
> +       (,@%qt-build-system-modules
> +        (guix build glib-or-gtk-build-system))
> +       #:modules
> +       ((guix build qt-build-system)
> +        ((guix build glib-or-gtk-build-system)
> +         #:prefix glib-or-gtk:)
> +        (guix build utils))
As with your telegram patch, I personally think the ordering is wrong
here.

> +               (("PKGCONFIG_GETVAR\\(dbus-1 session_bus_services_dir
> _install_dir\\)")
> +                "set(_install_dir
> \"${CMAKE_INSTALL_PREFIX}/share/dbus-1/services\")"))
You might want to regexp the middle part in case it is changed.

> +             ;; Turn-off the use of absolute Qt paths for
> installation.
> +             (substitute* "shell_integration/dolphin/CMakeLists.txt"
> +               (("ON CACHE")
> +                "OFF CACHE"))
What does this achieve exactly?

Btw. slightly off-topic, but if you're planning to reply to this patch-
set and send v8 at roughly the same time, please collapse it to a
single message as you're already using a "patches as attachments"
style.  Having everything in a single message makes it a little easier
for me to respond and Evolution can save all attachments to a directory
just fine.

Regards,
Leo





^ permalink raw reply	[flat|nested] 44+ messages in thread

* [bug#45889] Nextcloud Client (v7)
  2021-02-01 15:13 ` [bug#45889] Nextcloud Client (v7) Raghav Gururajan
  2021-02-09 10:22   ` Leo Prikler
@ 2021-02-09 12:53   ` Leo Prikler
  1 sibling, 0 replies; 44+ messages in thread
From: Leo Prikler @ 2021-02-09 12:53 UTC (permalink / raw)
  To: Raghav Gururajan, 45889

Am Montag, den 01.02.2021, 10:13 -0500 schrieb Raghav Gururajan:
> Subject: [PATCH 2/3] gnu: kwayland: Disable failing tests.
It seems the test you've disabled is no longer the only failing one.
Upstream kwayland builds by disabling tests altogether, so you can skip
this patch if you don't want to investigate further.  If you do want to
investigate further, I suggest doing those patches separately from
Nextcloud.

> 17/45 Test #17: kwayland-testWindowmanagement ..............Child
> aborted***Exception:   0.17 sec
> qt.qpa.xcb: could not connect to display 
> qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even
> though it was found.
> This application failed to start because no Qt platform plugin could
> be initialized. Reinstalling the application may fix this problem.
> 
> Available platform plugins are: eglfs, linuxfb, minimal, minimalegl,
> offscreen, vnc, xcb, wayland-egl, wayland, wayland-xcomposite-egl,
> wayland-xcomposite-glx.

Regards,
Leo





^ permalink raw reply	[flat|nested] 44+ messages in thread

* [bug#45889] Nextcloud Client (v8)
  2021-02-09 10:22   ` Leo Prikler
@ 2021-02-13 20:36     ` Raghav Gururajan
  2021-02-13 21:47       ` Leo Prikler
  0 siblings, 1 reply; 44+ messages in thread
From: Raghav Gururajan @ 2021-02-13 20:36 UTC (permalink / raw)
  To: Leo Prikler, 45889


[-- Attachment #1.1.1: Type: text/plain, Size: 834 bytes --]

Hi Leo!

> Is cmake really needed?  I know that meson falls back to cmake if pkg-
> config fails and also supports output to cmake, but meson/ninja should
> be the default.

Yes, it is used to generate `.cmake` files inder '[out]/lib/cmake'.

> Could you try packaging those for Guix as well?

They don't have dedicated build scripts.

> As with your telegram patch, I personally think the ordering is wrong
> here.

I changed it in v8.

> You might want to regexp the middle part in case it is changed.

I could use PKGCONFIG_GETVAR\\(.+\\) but that would conflict with other 
PKGCONFIG_GETVAR lines now or in future.

> What does this achieve exactly?

It configures the build-system to install modules in output "out" 
instead of Qt's (input) path.

I have attached v8 with this email.

Regards,
RG.

[-- Attachment #1.1.2: 0001-gnu-Add-appstream.patch --]
[-- Type: text/x-patch, Size: 5614 bytes --]

From f1d8d53754578c01023535625d7f58ecbcd8fe96 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <rg@raghavgururajan.name>
Date: Thu, 14 Jan 2021 23:32:27 -0500
Subject: [PATCH 1/2] gnu: Add appstream.

* gnu/packages/freedesktop.scm (appstream): New variable.
---
 gnu/packages/freedesktop.scm | 96 ++++++++++++++++++++++++++++++++++++
 1 file changed, 96 insertions(+)

diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 56e53a73e2..e8fed74170 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -58,8 +58,10 @@
   #:use-module (gnu packages bash)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
+  #:use-module (gnu packages cmake)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages cryptsetup)
+  #:use-module (gnu packages databases)
   #:use-module (gnu packages disk)
   #:use-module (gnu packages docbook)
   #:use-module (gnu packages documentation)
@@ -75,6 +77,7 @@
   #:use-module (gnu packages gstreamer)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages image)
+  #:use-module (gnu packages language)
   #:use-module (gnu packages libffi)
   #:use-module (gnu packages libunwind)
   #:use-module (gnu packages libusb)
@@ -101,6 +104,99 @@
   #:use-module (gnu packages xorg)
   #:use-module (srfi srfi-1))
 
+(define-public appstream
+  (package
+    (name "appstream")
+    (version "0.13.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append "https://www.freedesktop.org/software/"
+                       "appstream/releases/"
+                       "AppStream-" version ".tar.xz"))
+       (sha256
+        (base32 "09l6ixz1w29pi0nb0flz14m4r3f2hpqpp1fq8y66v9xa4c9fczds"))))
+    (build-system meson-build-system)
+    (arguments
+     `(#:glib-or-gtk? #t
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-libstemmer
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "meson.build"
+               (("/usr/include")
+                (string-append (assoc-ref inputs "libstemmer")
+                               "/include")))
+             #t))
+         (add-after 'patch-libstemmer 'patch-docbook-xml
+           (lambda* (#:key inputs #:allow-other-keys)
+             (with-directory-excursion "docs/api"
+               (substitute* "appstream-docs.xml"
+                 (("http://www.oasis-open.org/docbook/xml/4.3/")
+                  (string-append (assoc-ref inputs "docbook-xml-4.3")
+                                 "/xml/dtd/docbook/"))))
+             (for-each (lambda (file)
+                         (substitute* file
+                           (("http://www.oasis-open.org/docbook/xml/4.5/")
+                            (string-append (assoc-ref inputs "docbook-xml")
+                                           "/xml/dtd/docbook/"))))
+                       (find-files "scripts/desc" "\\.xml$"))
+             #t))
+         (add-after 'patch-docbook-xml 'disable-failing-tests
+           (lambda _
+             (substitute* "tests/test-pool.c"
+               (("	g_test_add_func \\(\"/AppStream/PoolRead\", test_pool_read\\);")
+                "")
+               (("	g_test_add_func \\(\"/AppStream/PoolReadAsync\", test_pool_read_async\\);")
+                "")
+               (("	g_test_add_func \\(\"/AppStream/PoolEmpty\", test_pool_empty\\);")
+                "")
+               (("	g_test_add_func \\(\"/AppStream/Cache\", test_cache\\);")
+                "")
+               (("	g_test_add_func \\(\"/AppStream/Merges\", test_merge_components\\);")
+                ""))
+             #t))
+         (add-after 'disable-failing-tests 'patch-install-dir
+           (lambda* (#:key outputs #:allow-other-keys)
+             (substitute* "data/meson.build"
+               (("/etc")
+                (string-append (assoc-ref outputs "out")
+                               "/etc")))
+             #t)))))
+    (native-inputs
+     `(("cmake" ,cmake)
+       ("docbook-xml-4.3" ,docbook-xml-4.3)
+       ("docbook-xml" ,docbook-xml)
+       ("docbook-xsl" ,docbook-xsl)
+       ("gettext" ,gettext-minimal)
+       ("glib:bin" ,glib "bin")
+       ("gobject-introspection" ,gobject-introspection)
+       ("gperf" ,gperf)
+       ("gtk-doc" ,gtk-doc)
+       ("pkg-config" ,pkg-config)
+       ("python" ,python-wrapper)
+       ("xsltproc" ,libxslt)))
+    (inputs
+     `(("libsoup" ,libsoup)
+       ("libstemmer" ,libstemmer)
+       ("libxml2" ,libxml2)
+       ("libyaml" ,libyaml)
+       ("lmdb" ,lmdb)))
+    (propagated-inputs
+     `(("glib" ,glib)))
+    (synopsis "Tools and libraries to work with AppStream metadata")
+    (description "AppStream is a cross-distribution effort for enhancing the way
+we interact with the software repositories provided by distributions by
+standardizing software component metadata.  It provides the foundation to build
+software-center applications, by providing metadata necessary for an
+application-centric view on package repositories.  It additionally provides
+specifications for things like an unified software metadata database, screenshot
+services and various other things needed to create user-friendly
+application-centers for distributions.")
+    (home-page "https://www.freedesktop.org/wiki/Distributions/AppStream/")
+    (license license:gpl2+)))
+
 (define-public farstream
   (package
     (name "farstream")
-- 
2.30.0


[-- Attachment #1.1.3: 0002-gnu-Add-nextcloud-client.patch --]
[-- Type: text/x-patch, Size: 7172 bytes --]

From 8f8c9e98ffd7bbb16738d9bd5836fb723731c5e7 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <rg@raghavgururajan.name>
Date: Fri, 15 Jan 2021 05:04:31 -0500
Subject: [PATCH 2/2] gnu: Add nextcloud-client.

* gnu/packages/nextcloud.scm: New module.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
* gnu/packages/nextcloud.scm (nextcloud-client): New variable.
---
 gnu/local.mk               |   1 +
 gnu/packages/nextcloud.scm | 150 +++++++++++++++++++++++++++++++++++++
 2 files changed, 151 insertions(+)
 create mode 100644 gnu/packages/nextcloud.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index ad6e02116e..56cf470a2d 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -398,6 +398,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/netpbm.scm			\
   %D%/packages/nettle.scm			\
   %D%/packages/networking.scm			\
+  %D%/packages/nextcloud.scm              \
   %D%/packages/nfs.scm                          \
   %D%/packages/nickle.scm                       \
   %D%/packages/nicotine.scm                     \
diff --git a/gnu/packages/nextcloud.scm b/gnu/packages/nextcloud.scm
new file mode 100644
index 0000000000..2e1e694ad0
--- /dev/null
+++ b/gnu/packages/nextcloud.scm
@@ -0,0 +1,150 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2021 Raghav Gururajan <rg@raghavgururajan.name>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages nextcloud)
+  #:use-module (gnu packages)
+  #:use-module (gnu packages check)
+  #:use-module (gnu packages compression)
+  #:use-module (gnu packages documentation)
+  #:use-module (gnu packages freedesktop)
+  #:use-module (gnu packages glib)
+  #:use-module (gnu packages gnome)
+  #:use-module (gnu packages graphviz)
+  #:use-module (gnu packages kde-frameworks)
+  #:use-module (gnu packages perl)
+  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages python)
+  #:use-module (gnu packages qt)
+  #:use-module (gnu packages ruby)
+  #:use-module (gnu packages sphinx)
+  #:use-module (gnu packages sqlite)
+  #:use-module (gnu packages tls)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix packages)
+  #:use-module (guix git-download)
+  #:use-module (guix build-system glib-or-gtk)
+  #:use-module (guix build-system qt))
+
+(define-public nextcloud-client
+  (package
+    (name "nextcloud-client")
+    (version "3.1.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://github.com/nextcloud/desktop")
+         (commit
+          (string-append "v" version))))
+       (file-name
+        (git-file-name name version))
+       (sha256
+        (base32 "022k7b3c30dymrjc1g3ly2cac1c34gkqnvjya6p7w2j3qw2w1dm2"))
+       (modules '((guix build utils)
+                  (ice-9 ftw)
+                  (srfi srfi-1)))
+       (snippet
+        `(begin
+           (let ((keep '( ;; Not available in Guix.
+                         "QProgressIndicator" "kmessagewidget" "qtlockedfile"
+                         "qtokenizer" "qtsingleapplication")))
+             (with-directory-excursion "src/3rdparty"
+               (for-each delete-file-recursively
+                         (lset-difference string=?
+                                          (scandir ".")
+                                          (cons* "." ".." keep))))
+             #t)))))
+    (build-system qt-build-system)
+    (arguments
+     `(#:configure-flags
+       (list
+        "-DUNIT_TESTING=ON")
+       #: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))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-plugin-dirs
+           (lambda* (#:key outputs #:allow-other-keys)
+             ;; Patch install directory for dbus service files.
+             (substitute* "shell_integration/libcloudproviders/CMakeLists.txt"
+               (("PKGCONFIG_GETVAR\\(dbus-1 session_bus_services_dir _install_dir\\)")
+                "set(_install_dir \"${CMAKE_INSTALL_PREFIX}/share/dbus-1/services\")"))
+             ;; Turn-off the use of absolute Qt paths for installation.
+             (substitute* "shell_integration/dolphin/CMakeLists.txt"
+               (("ON CACHE")
+                "OFF CACHE"))
+             #t))
+         (add-before 'check 'pre-check
+           (lambda _
+             ;; 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)))))
+    (native-inputs
+     `(("cmocka" ,cmocka)
+       ("dot" ,graphviz)
+       ("doxygen" ,doxygen)
+       ("extra-cmake-modules" ,extra-cmake-modules)
+       ("glib:bin" ,glib "bin")
+       ("perl" ,perl)
+       ("pkg-config" ,pkg-config)
+       ("python" ,python-wrapper)
+       ("qttools" ,qttools)
+       ("ruby" ,ruby)))
+    (inputs
+     `(("appstream" ,appstream)
+       ("glib" ,glib)
+       ("kconfig" ,kconfig)
+       ("kcoreaddons" ,kcoreaddons)
+       ("kio" ,kio)
+       ("libcloudproviders" ,libcloudproviders)
+       ("openssl" ,openssl)
+       ("qtbase" ,qtbase)
+       ("qtdeclarative" ,qtdeclarative)
+       ("qtgraphicaleffects" ,qtgraphicaleffects)
+       ("qtkeychain" ,qtkeychain)
+       ("qtquickcontrols2" ,qtquickcontrols2)
+       ("qtsvg" ,qtsvg)
+       ("qtwebchannel" ,qtwebchannel)
+       ("qtwebkit" ,qtwebkit)
+       ("sqlite" ,sqlite)
+       ("zlib" ,zlib)))
+    (propagated-inputs
+     `(("qtwebengine" ,qtwebengine)))
+    (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/install/#install-clients")
+    (license
+     (list
+      ;; QtProgressIndicator
+      license:expat
+      ;; All ThirdParty (except QtProgressIndicator)
+      license:lgpl2.1+
+      ;; Others
+      license:gpl2+))))
-- 
2.30.0


[-- Attachment #1.1.4: OpenPGP_0x5F5816647F8BE551.asc --]
[-- Type: application/pgp-keys, Size: 2649 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [bug#45889] Nextcloud Client (v8)
  2021-02-13 20:36     ` [bug#45889] Nextcloud Client (v8) Raghav Gururajan
@ 2021-02-13 21:47       ` Leo Prikler
  2021-02-13 23:54         ` Raghav Gururajan
  0 siblings, 1 reply; 44+ messages in thread
From: Leo Prikler @ 2021-02-13 21:47 UTC (permalink / raw)
  To: Raghav Gururajan, 45889

Hi Raghav,

Am Samstag, den 13.02.2021, 15:36 -0500 schrieb Raghav Gururajan:
> Hi Leo!
> 
> > Is cmake really needed?  I know that meson falls back to cmake if
> > pkg-
> > config fails and also supports output to cmake, but meson/ninja
> > should
> > be the default.
> 
> Yes, it is used to generate `.cmake` files inder '[out]/lib/cmake'.
Fair enough.

> > Could you try packaging those for Guix as well?
> 
> They don't have dedicated build scripts.
That may be an issue.  You might want to check which of those are
perhaps optional, so that you don't need to pull them in.  For example
it appears you're also deleting libcrashreporter-qt with no
replacement.

kmessagewidget appears to be a part of KDE core.  If anything there is
strictly necessary for building, we should perhaps define a package
variant, that has a slightly patched kmessagewidget.  qtlockedfile and
qtsingleapplication appear to be part of [1], a sort of metapackage,
from which you could spawn multiple descriptions.  For qtokenizer, I am
really not sure.

> > As with your telegram patch, I personally think the ordering is
> > wrong
> > here.
> 
> I changed it in v8.
LGTM.

> > You might want to regexp the middle part in case it is changed.
> 
> I could use PKGCONFIG_GETVAR\\(.+\\) but that would conflict with
> other 
> PKGCONFIG_GETVAR lines now or in future.
Okay, but you can do something like PKGCONFIG_GETVAR\\(.+
_install_dir\\), assuming that such variables should generally only be
bound once.  To be honest, I don't know enough CMake to tell, whether
that is a good idea, however.

> > What does this achieve exactly?
> 
> It configures the build-system to install modules in output "out" 
> instead of Qt's (input) path.
In that case, the comment should probably read something along the
lines of "Make sure, that <X> is installed under $prefix."

Regards,
Leo

[1] https://github.com/qtproject/qt-solutions





^ permalink raw reply	[flat|nested] 44+ messages in thread

* [bug#45889] Nextcloud Client (v8)
  2021-02-13 21:47       ` Leo Prikler
@ 2021-02-13 23:54         ` Raghav Gururajan
  2021-02-14  0:47           ` [bug#45889] Nextcloud Client (v9) Raghav Gururajan
  2021-02-14 10:53           ` [bug#45889] Nextcloud Client (v8) Leo Prikler
  0 siblings, 2 replies; 44+ messages in thread
From: Raghav Gururajan @ 2021-02-13 23:54 UTC (permalink / raw)
  To: Leo Prikler, 45889


[-- Attachment #1.1.1: Type: text/plain, Size: 1266 bytes --]

Hi Leo!

> That may be an issue.  You might want to check which of those are
> perhaps optional, so that you don't need to pull them in.  For example
> it appears you're also deleting libcrashreporter-qt with no
> replacement.

I tried building with each one of them, but build fails without them 
(except libcrashreporter-qt).

> kmessagewidget appears to be a part of KDE core.  If anything there is
> strictly necessary for building, we should perhaps define a package
> variant, that has a slightly patched kmessagewidget.  qtlockedfile and
> qtsingleapplication appear to be part of [1], a sort of metapackage,
> from which you could spawn multiple descriptions.  For qtokenizer, I am
> really not sure.

Thanks for the info. This package doesn't have an option or code to use 
packaged ones.

> Okay, but you can do something like PKGCONFIG_GETVAR\\(.+
> _install_dir\\), assuming that such variables should generally only be
> bound once.  To be honest, I don't know enough CMake to tell, whether
> that is a good idea, however.

Changed in v9.

> In that case, the comment should probably read something along the
> lines of "Make sure, that <X> is installed under $prefix."

Changed in v9.

v9 is attached.

Regards,
RG.

[-- Attachment #1.1.2: 0001-gnu-Add-appstream.patch --]
[-- Type: text/x-patch, Size: 5614 bytes --]

From f1d8d53754578c01023535625d7f58ecbcd8fe96 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <rg@raghavgururajan.name>
Date: Thu, 14 Jan 2021 23:32:27 -0500
Subject: [PATCH 1/2] gnu: Add appstream.

* gnu/packages/freedesktop.scm (appstream): New variable.
---
 gnu/packages/freedesktop.scm | 96 ++++++++++++++++++++++++++++++++++++
 1 file changed, 96 insertions(+)

diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 56e53a73e2..e8fed74170 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -58,8 +58,10 @@
   #:use-module (gnu packages bash)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
+  #:use-module (gnu packages cmake)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages cryptsetup)
+  #:use-module (gnu packages databases)
   #:use-module (gnu packages disk)
   #:use-module (gnu packages docbook)
   #:use-module (gnu packages documentation)
@@ -75,6 +77,7 @@
   #:use-module (gnu packages gstreamer)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages image)
+  #:use-module (gnu packages language)
   #:use-module (gnu packages libffi)
   #:use-module (gnu packages libunwind)
   #:use-module (gnu packages libusb)
@@ -101,6 +104,99 @@
   #:use-module (gnu packages xorg)
   #:use-module (srfi srfi-1))
 
+(define-public appstream
+  (package
+    (name "appstream")
+    (version "0.13.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append "https://www.freedesktop.org/software/"
+                       "appstream/releases/"
+                       "AppStream-" version ".tar.xz"))
+       (sha256
+        (base32 "09l6ixz1w29pi0nb0flz14m4r3f2hpqpp1fq8y66v9xa4c9fczds"))))
+    (build-system meson-build-system)
+    (arguments
+     `(#:glib-or-gtk? #t
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-libstemmer
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "meson.build"
+               (("/usr/include")
+                (string-append (assoc-ref inputs "libstemmer")
+                               "/include")))
+             #t))
+         (add-after 'patch-libstemmer 'patch-docbook-xml
+           (lambda* (#:key inputs #:allow-other-keys)
+             (with-directory-excursion "docs/api"
+               (substitute* "appstream-docs.xml"
+                 (("http://www.oasis-open.org/docbook/xml/4.3/")
+                  (string-append (assoc-ref inputs "docbook-xml-4.3")
+                                 "/xml/dtd/docbook/"))))
+             (for-each (lambda (file)
+                         (substitute* file
+                           (("http://www.oasis-open.org/docbook/xml/4.5/")
+                            (string-append (assoc-ref inputs "docbook-xml")
+                                           "/xml/dtd/docbook/"))))
+                       (find-files "scripts/desc" "\\.xml$"))
+             #t))
+         (add-after 'patch-docbook-xml 'disable-failing-tests
+           (lambda _
+             (substitute* "tests/test-pool.c"
+               (("	g_test_add_func \\(\"/AppStream/PoolRead\", test_pool_read\\);")
+                "")
+               (("	g_test_add_func \\(\"/AppStream/PoolReadAsync\", test_pool_read_async\\);")
+                "")
+               (("	g_test_add_func \\(\"/AppStream/PoolEmpty\", test_pool_empty\\);")
+                "")
+               (("	g_test_add_func \\(\"/AppStream/Cache\", test_cache\\);")
+                "")
+               (("	g_test_add_func \\(\"/AppStream/Merges\", test_merge_components\\);")
+                ""))
+             #t))
+         (add-after 'disable-failing-tests 'patch-install-dir
+           (lambda* (#:key outputs #:allow-other-keys)
+             (substitute* "data/meson.build"
+               (("/etc")
+                (string-append (assoc-ref outputs "out")
+                               "/etc")))
+             #t)))))
+    (native-inputs
+     `(("cmake" ,cmake)
+       ("docbook-xml-4.3" ,docbook-xml-4.3)
+       ("docbook-xml" ,docbook-xml)
+       ("docbook-xsl" ,docbook-xsl)
+       ("gettext" ,gettext-minimal)
+       ("glib:bin" ,glib "bin")
+       ("gobject-introspection" ,gobject-introspection)
+       ("gperf" ,gperf)
+       ("gtk-doc" ,gtk-doc)
+       ("pkg-config" ,pkg-config)
+       ("python" ,python-wrapper)
+       ("xsltproc" ,libxslt)))
+    (inputs
+     `(("libsoup" ,libsoup)
+       ("libstemmer" ,libstemmer)
+       ("libxml2" ,libxml2)
+       ("libyaml" ,libyaml)
+       ("lmdb" ,lmdb)))
+    (propagated-inputs
+     `(("glib" ,glib)))
+    (synopsis "Tools and libraries to work with AppStream metadata")
+    (description "AppStream is a cross-distribution effort for enhancing the way
+we interact with the software repositories provided by distributions by
+standardizing software component metadata.  It provides the foundation to build
+software-center applications, by providing metadata necessary for an
+application-centric view on package repositories.  It additionally provides
+specifications for things like an unified software metadata database, screenshot
+services and various other things needed to create user-friendly
+application-centers for distributions.")
+    (home-page "https://www.freedesktop.org/wiki/Distributions/AppStream/")
+    (license license:gpl2+)))
+
 (define-public farstream
   (package
     (name "farstream")
-- 
2.30.0


[-- Attachment #1.1.3: 0002-gnu-Add-nextcloud-client.patch --]
[-- Type: text/x-patch, Size: 7172 bytes --]

From 8f8c9e98ffd7bbb16738d9bd5836fb723731c5e7 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <rg@raghavgururajan.name>
Date: Fri, 15 Jan 2021 05:04:31 -0500
Subject: [PATCH 2/2] gnu: Add nextcloud-client.

* gnu/packages/nextcloud.scm: New module.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
* gnu/packages/nextcloud.scm (nextcloud-client): New variable.
---
 gnu/local.mk               |   1 +
 gnu/packages/nextcloud.scm | 150 +++++++++++++++++++++++++++++++++++++
 2 files changed, 151 insertions(+)
 create mode 100644 gnu/packages/nextcloud.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index ad6e02116e..56cf470a2d 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -398,6 +398,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/netpbm.scm			\
   %D%/packages/nettle.scm			\
   %D%/packages/networking.scm			\
+  %D%/packages/nextcloud.scm              \
   %D%/packages/nfs.scm                          \
   %D%/packages/nickle.scm                       \
   %D%/packages/nicotine.scm                     \
diff --git a/gnu/packages/nextcloud.scm b/gnu/packages/nextcloud.scm
new file mode 100644
index 0000000000..2e1e694ad0
--- /dev/null
+++ b/gnu/packages/nextcloud.scm
@@ -0,0 +1,150 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2021 Raghav Gururajan <rg@raghavgururajan.name>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages nextcloud)
+  #:use-module (gnu packages)
+  #:use-module (gnu packages check)
+  #:use-module (gnu packages compression)
+  #:use-module (gnu packages documentation)
+  #:use-module (gnu packages freedesktop)
+  #:use-module (gnu packages glib)
+  #:use-module (gnu packages gnome)
+  #:use-module (gnu packages graphviz)
+  #:use-module (gnu packages kde-frameworks)
+  #:use-module (gnu packages perl)
+  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages python)
+  #:use-module (gnu packages qt)
+  #:use-module (gnu packages ruby)
+  #:use-module (gnu packages sphinx)
+  #:use-module (gnu packages sqlite)
+  #:use-module (gnu packages tls)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix packages)
+  #:use-module (guix git-download)
+  #:use-module (guix build-system glib-or-gtk)
+  #:use-module (guix build-system qt))
+
+(define-public nextcloud-client
+  (package
+    (name "nextcloud-client")
+    (version "3.1.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://github.com/nextcloud/desktop")
+         (commit
+          (string-append "v" version))))
+       (file-name
+        (git-file-name name version))
+       (sha256
+        (base32 "022k7b3c30dymrjc1g3ly2cac1c34gkqnvjya6p7w2j3qw2w1dm2"))
+       (modules '((guix build utils)
+                  (ice-9 ftw)
+                  (srfi srfi-1)))
+       (snippet
+        `(begin
+           (let ((keep '( ;; Not available in Guix.
+                         "QProgressIndicator" "kmessagewidget" "qtlockedfile"
+                         "qtokenizer" "qtsingleapplication")))
+             (with-directory-excursion "src/3rdparty"
+               (for-each delete-file-recursively
+                         (lset-difference string=?
+                                          (scandir ".")
+                                          (cons* "." ".." keep))))
+             #t)))))
+    (build-system qt-build-system)
+    (arguments
+     `(#:configure-flags
+       (list
+        "-DUNIT_TESTING=ON")
+       #: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))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-plugin-dirs
+           (lambda* (#:key outputs #:allow-other-keys)
+             ;; Patch install directory for dbus service files.
+             (substitute* "shell_integration/libcloudproviders/CMakeLists.txt"
+               (("PKGCONFIG_GETVAR\\(dbus-1 session_bus_services_dir _install_dir\\)")
+                "set(_install_dir \"${CMAKE_INSTALL_PREFIX}/share/dbus-1/services\")"))
+             ;; Turn-off the use of absolute Qt paths for installation.
+             (substitute* "shell_integration/dolphin/CMakeLists.txt"
+               (("ON CACHE")
+                "OFF CACHE"))
+             #t))
+         (add-before 'check 'pre-check
+           (lambda _
+             ;; 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)))))
+    (native-inputs
+     `(("cmocka" ,cmocka)
+       ("dot" ,graphviz)
+       ("doxygen" ,doxygen)
+       ("extra-cmake-modules" ,extra-cmake-modules)
+       ("glib:bin" ,glib "bin")
+       ("perl" ,perl)
+       ("pkg-config" ,pkg-config)
+       ("python" ,python-wrapper)
+       ("qttools" ,qttools)
+       ("ruby" ,ruby)))
+    (inputs
+     `(("appstream" ,appstream)
+       ("glib" ,glib)
+       ("kconfig" ,kconfig)
+       ("kcoreaddons" ,kcoreaddons)
+       ("kio" ,kio)
+       ("libcloudproviders" ,libcloudproviders)
+       ("openssl" ,openssl)
+       ("qtbase" ,qtbase)
+       ("qtdeclarative" ,qtdeclarative)
+       ("qtgraphicaleffects" ,qtgraphicaleffects)
+       ("qtkeychain" ,qtkeychain)
+       ("qtquickcontrols2" ,qtquickcontrols2)
+       ("qtsvg" ,qtsvg)
+       ("qtwebchannel" ,qtwebchannel)
+       ("qtwebkit" ,qtwebkit)
+       ("sqlite" ,sqlite)
+       ("zlib" ,zlib)))
+    (propagated-inputs
+     `(("qtwebengine" ,qtwebengine)))
+    (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/install/#install-clients")
+    (license
+     (list
+      ;; QtProgressIndicator
+      license:expat
+      ;; All ThirdParty (except QtProgressIndicator)
+      license:lgpl2.1+
+      ;; Others
+      license:gpl2+))))
-- 
2.30.0


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [bug#45889] Nextcloud Client (v9)
  2021-02-13 23:54         ` Raghav Gururajan
@ 2021-02-14  0:47           ` Raghav Gururajan
  2021-02-14 10:53           ` [bug#45889] Nextcloud Client (v8) Leo Prikler
  1 sibling, 0 replies; 44+ messages in thread
From: Raghav Gururajan @ 2021-02-14  0:47 UTC (permalink / raw)
  To: Leo Prikler, 45889


[-- Attachment #1.1.1: Type: text/plain, Size: 104 bytes --]

Hi Leo!

> v9 is attached.

Attached wrong ones there, here are the correct ones.

Regards,
RG.

[-- Attachment #1.1.2: 0001-gnu-Add-appstream.patch --]
[-- Type: text/x-patch, Size: 5614 bytes --]

From f1d8d53754578c01023535625d7f58ecbcd8fe96 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <rg@raghavgururajan.name>
Date: Thu, 14 Jan 2021 23:32:27 -0500
Subject: [PATCH 1/2] gnu: Add appstream.

* gnu/packages/freedesktop.scm (appstream): New variable.
---
 gnu/packages/freedesktop.scm | 96 ++++++++++++++++++++++++++++++++++++
 1 file changed, 96 insertions(+)

diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 56e53a73e2..e8fed74170 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -58,8 +58,10 @@
   #:use-module (gnu packages bash)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
+  #:use-module (gnu packages cmake)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages cryptsetup)
+  #:use-module (gnu packages databases)
   #:use-module (gnu packages disk)
   #:use-module (gnu packages docbook)
   #:use-module (gnu packages documentation)
@@ -75,6 +77,7 @@
   #:use-module (gnu packages gstreamer)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages image)
+  #:use-module (gnu packages language)
   #:use-module (gnu packages libffi)
   #:use-module (gnu packages libunwind)
   #:use-module (gnu packages libusb)
@@ -101,6 +104,99 @@
   #:use-module (gnu packages xorg)
   #:use-module (srfi srfi-1))
 
+(define-public appstream
+  (package
+    (name "appstream")
+    (version "0.13.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append "https://www.freedesktop.org/software/"
+                       "appstream/releases/"
+                       "AppStream-" version ".tar.xz"))
+       (sha256
+        (base32 "09l6ixz1w29pi0nb0flz14m4r3f2hpqpp1fq8y66v9xa4c9fczds"))))
+    (build-system meson-build-system)
+    (arguments
+     `(#:glib-or-gtk? #t
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-libstemmer
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "meson.build"
+               (("/usr/include")
+                (string-append (assoc-ref inputs "libstemmer")
+                               "/include")))
+             #t))
+         (add-after 'patch-libstemmer 'patch-docbook-xml
+           (lambda* (#:key inputs #:allow-other-keys)
+             (with-directory-excursion "docs/api"
+               (substitute* "appstream-docs.xml"
+                 (("http://www.oasis-open.org/docbook/xml/4.3/")
+                  (string-append (assoc-ref inputs "docbook-xml-4.3")
+                                 "/xml/dtd/docbook/"))))
+             (for-each (lambda (file)
+                         (substitute* file
+                           (("http://www.oasis-open.org/docbook/xml/4.5/")
+                            (string-append (assoc-ref inputs "docbook-xml")
+                                           "/xml/dtd/docbook/"))))
+                       (find-files "scripts/desc" "\\.xml$"))
+             #t))
+         (add-after 'patch-docbook-xml 'disable-failing-tests
+           (lambda _
+             (substitute* "tests/test-pool.c"
+               (("	g_test_add_func \\(\"/AppStream/PoolRead\", test_pool_read\\);")
+                "")
+               (("	g_test_add_func \\(\"/AppStream/PoolReadAsync\", test_pool_read_async\\);")
+                "")
+               (("	g_test_add_func \\(\"/AppStream/PoolEmpty\", test_pool_empty\\);")
+                "")
+               (("	g_test_add_func \\(\"/AppStream/Cache\", test_cache\\);")
+                "")
+               (("	g_test_add_func \\(\"/AppStream/Merges\", test_merge_components\\);")
+                ""))
+             #t))
+         (add-after 'disable-failing-tests 'patch-install-dir
+           (lambda* (#:key outputs #:allow-other-keys)
+             (substitute* "data/meson.build"
+               (("/etc")
+                (string-append (assoc-ref outputs "out")
+                               "/etc")))
+             #t)))))
+    (native-inputs
+     `(("cmake" ,cmake)
+       ("docbook-xml-4.3" ,docbook-xml-4.3)
+       ("docbook-xml" ,docbook-xml)
+       ("docbook-xsl" ,docbook-xsl)
+       ("gettext" ,gettext-minimal)
+       ("glib:bin" ,glib "bin")
+       ("gobject-introspection" ,gobject-introspection)
+       ("gperf" ,gperf)
+       ("gtk-doc" ,gtk-doc)
+       ("pkg-config" ,pkg-config)
+       ("python" ,python-wrapper)
+       ("xsltproc" ,libxslt)))
+    (inputs
+     `(("libsoup" ,libsoup)
+       ("libstemmer" ,libstemmer)
+       ("libxml2" ,libxml2)
+       ("libyaml" ,libyaml)
+       ("lmdb" ,lmdb)))
+    (propagated-inputs
+     `(("glib" ,glib)))
+    (synopsis "Tools and libraries to work with AppStream metadata")
+    (description "AppStream is a cross-distribution effort for enhancing the way
+we interact with the software repositories provided by distributions by
+standardizing software component metadata.  It provides the foundation to build
+software-center applications, by providing metadata necessary for an
+application-centric view on package repositories.  It additionally provides
+specifications for things like an unified software metadata database, screenshot
+services and various other things needed to create user-friendly
+application-centers for distributions.")
+    (home-page "https://www.freedesktop.org/wiki/Distributions/AppStream/")
+    (license license:gpl2+)))
+
 (define-public farstream
   (package
     (name "farstream")
-- 
2.30.0


[-- Attachment #1.1.3: 0002-gnu-Add-nextcloud-client.patch --]
[-- Type: text/x-patch, Size: 7455 bytes --]

From 0229444a24ba11a6764f5b6952a2aa9cd86e25eb Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <rg@raghavgururajan.name>
Date: Fri, 15 Jan 2021 05:04:31 -0500
Subject: [PATCH 2/2] gnu: Add nextcloud-client.

* gnu/packages/nextcloud.scm: New module.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
* gnu/packages/nextcloud.scm (nextcloud-client): New variable.
---
 gnu/local.mk               |   1 +
 gnu/packages/nextcloud.scm | 158 +++++++++++++++++++++++++++++++++++++
 2 files changed, 159 insertions(+)
 create mode 100644 gnu/packages/nextcloud.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index ad6e02116e..56cf470a2d 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -398,6 +398,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/netpbm.scm			\
   %D%/packages/nettle.scm			\
   %D%/packages/networking.scm			\
+  %D%/packages/nextcloud.scm              \
   %D%/packages/nfs.scm                          \
   %D%/packages/nickle.scm                       \
   %D%/packages/nicotine.scm                     \
diff --git a/gnu/packages/nextcloud.scm b/gnu/packages/nextcloud.scm
new file mode 100644
index 0000000000..fac80485f7
--- /dev/null
+++ b/gnu/packages/nextcloud.scm
@@ -0,0 +1,158 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2021 Raghav Gururajan <rg@raghavgururajan.name>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages nextcloud)
+  #:use-module (gnu packages)
+  #:use-module (gnu packages check)
+  #:use-module (gnu packages compression)
+  #:use-module (gnu packages documentation)
+  #:use-module (gnu packages freedesktop)
+  #:use-module (gnu packages glib)
+  #:use-module (gnu packages gnome)
+  #:use-module (gnu packages graphviz)
+  #:use-module (gnu packages kde-frameworks)
+  #:use-module (gnu packages perl)
+  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages python)
+  #:use-module (gnu packages python-xyz)
+  #:use-module (gnu packages qt)
+  #:use-module (gnu packages ruby)
+  #:use-module (gnu packages sphinx)
+  #:use-module (gnu packages sqlite)
+  #:use-module (gnu packages tls)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix packages)
+  #:use-module (guix git-download)
+  #:use-module (guix build-system glib-or-gtk)
+  #:use-module (guix build-system qt))
+
+(define-public nextcloud-client
+  (package
+    (name "nextcloud-client")
+    (version "3.1.2")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://github.com/nextcloud/desktop")
+         (commit
+          (string-append "v" version))))
+       (file-name
+        (git-file-name name version))
+       (sha256
+        (base32 "10f9kmbn7s3hlkg1pv4kjflzh0159psrilci56kg4s2m49andhbs"))
+       (modules '((guix build utils)
+                  (ice-9 ftw)
+                  (srfi srfi-1)))
+       (snippet
+        `(begin
+           (let ((keep '( ;; Not available in Guix.
+                         "QProgressIndicator"
+                         "kmessagewidget" "qtlockedfile"
+                         "qtokenizer" "qtsingleapplication")))
+             (with-directory-excursion "src/3rdparty"
+               (for-each delete-file-recursively
+                         (lset-difference string=?
+                                          (scandir ".")
+                                          (cons* "." ".." keep))))
+             #t)))))
+    (build-system qt-build-system)
+    (arguments
+     `(#:configure-flags
+       (list
+        "-DUNIT_TESTING=ON"
+        ;; Upstream Bug: https://github.com/nextcloud/desktop/issues/2885
+        "-DNO_SHIBBOLETH=ON")
+       #: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))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-plugin-dirs
+           (lambda* (#:key outputs #:allow-other-keys)
+             ;; Patch install directory for dbus service files.
+             (substitute* "shell_integration/libcloudproviders/CMakeLists.txt"
+               (("PKGCONFIG_GETVAR\\(.+_install_dir\\)")
+                "set(_install_dir \"${CMAKE_INSTALL_PREFIX}/share/dbus-1/services\")"))
+             ;; Make sure, that Qt modules are installed under $prefix.
+             (substitute* "shell_integration/dolphin/CMakeLists.txt"
+               (("ON CACHE")
+                "OFF CACHE"))
+             #t))
+         (add-before 'check 'pre-check
+           (lambda _
+             ;; 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)))))
+    (native-inputs
+     `(("cmocka" ,cmocka)
+       ("dot" ,graphviz)
+       ("doxygen" ,doxygen)
+       ("extra-cmake-modules" ,extra-cmake-modules)
+       ("glib:bin" ,glib "bin")
+       ("perl" ,perl)
+       ("pkg-config" ,pkg-config)
+       ("python" ,python-wrapper)
+       ("qttools" ,qttools)
+       ("ruby" ,ruby)))
+    (inputs
+     `(("appstream" ,appstream)
+       ("glib" ,glib)
+       ("kconfig" ,kconfig)
+       ("kcoreaddons" ,kcoreaddons)
+       ("kio" ,kio)
+       ("kjs" ,kjs)
+       ("libcloudproviders" ,libcloudproviders)
+       ("libzip" ,libzip)
+       ("openssl" ,openssl)
+       ("python-nautilus" ,python-nautilus)
+       ("qtbase" ,qtbase)
+       ("qtdeclarative" ,qtdeclarative)
+       ("qtgraphicaleffects" ,qtgraphicaleffects)
+       ("qtkeychain" ,qtkeychain)
+       ("qtquickcontrols2" ,qtquickcontrols2)
+       ("qtsvg" ,qtsvg)
+       ("qtwebchannel" ,qtwebchannel)
+       ("qtwebsockets" ,qtwebsockets)
+       ("qtwebkit" ,qtwebkit)
+       ("sqlite" ,sqlite)
+       ("zlib" ,zlib)))
+    (propagated-inputs
+     `(("qtwebengine" ,qtwebengine)))
+    (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/install/#install-clients")
+    (license
+     (list
+      ;; QtProgressIndicator
+      license:expat
+      ;; All ThirdParty (except QtProgressIndicator)
+      license:lgpl2.1+
+      ;; Others
+      license:gpl2+))))
-- 
2.30.0


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [bug#45889] Nextcloud Client (v8)
  2021-02-13 23:54         ` Raghav Gururajan
  2021-02-14  0:47           ` [bug#45889] Nextcloud Client (v9) Raghav Gururajan
@ 2021-02-14 10:53           ` Leo Prikler
  2021-02-18 20:23             ` [bug#45889] Nextcloud Client (v10) Raghav Gururajan via Guix-patches via
  1 sibling, 1 reply; 44+ messages in thread
From: Leo Prikler @ 2021-02-14 10:53 UTC (permalink / raw)
  To: Raghav Gururajan, 45889

Hi Raghav,

Am Samstag, den 13.02.2021, 18:54 -0500 schrieb Raghav Gururajan:
> Hi Leo!
> 
> > That may be an issue.  You might want to check which of those are
> > perhaps optional, so that you don't need to pull them in.  For
> > example
> > it appears you're also deleting libcrashreporter-qt with no
> > replacement.
> 
> I tried building with each one of them, but build fails without them 
> (except libcrashreporter-qt).
Interesting.  Is this due to CMakeLists picking up, that they're
missing and not replacing them with core stuff?

> > kmessagewidget appears to be a part of KDE core.  If anything there
> > is
> > strictly necessary for building, we should perhaps define a package
> > variant, that has a slightly patched kmessagewidget.  qtlockedfile
> > and
> > qtsingleapplication appear to be part of [1], a sort of
> > metapackage,
> > from which you could spawn multiple descriptions.  For qtokenizer,
> > I am
> > really not sure.
> 
> Thanks for the info. This package doesn't have an option or code to
> use packaged ones.
Perhaps you can patch the CMakeLists to add such support? 
Alternatively, you might want to delete them and unpack the upstream
ones to their locations.

> > Okay, but you can do something like PKGCONFIG_GETVAR\\(.+
> > _install_dir\\), assuming that such variables should generally only
> > be
> > bound once.  To be honest, I don't know enough CMake to tell,
> > whether
> > that is a good idea, however.
> 
> Changed in v9.
Note, that you're missing a space here.  This would also match
PKGCONFIG_GETVAR(pkg var foobar_install_dir).

> > In that case, the comment should probably read something along the
> > lines of "Make sure, that <X> is installed under $prefix."
> 
> Changed in v9.
LGTM.

Regards,
Leo





^ permalink raw reply	[flat|nested] 44+ messages in thread

* [bug#45889] Nextcloud Client (v10)
  2021-02-14 10:53           ` [bug#45889] Nextcloud Client (v8) Leo Prikler
@ 2021-02-18 20:23             ` Raghav Gururajan via Guix-patches via
  2021-02-18 22:26               ` Leo Prikler
  0 siblings, 1 reply; 44+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-02-18 20:23 UTC (permalink / raw)
  To: Leo Prikler, 45889


[-- Attachment #1.1.1: Type: text/plain, Size: 776 bytes --]

Hi Leo!

> Interesting.  Is this due to CMakeLists picking up, that they're
> missing and not replacing them with core stuff?
> 
> Perhaps you can patch the CMakeLists to add such support?
> Alternatively, you might want to delete them and unpack the upstream
> ones to their locations.

I have asked upstream and they are looking into providing options to use 
distribution packages. 
https://github.com/nextcloud/desktop/issues/2929#issuecomment-780548919

So once they update the source in the next-release, I will update the 
package and remove the 3rdparty directory completely. :-)

> Note, that you're missing a space here.  This would also match
> PKGCONFIG_GETVAR(pkg var foobar_install_dir).

Changed in v10.

V10 is attached.

Regards,
RG.

[-- Attachment #1.1.2: 0001-gnu-Add-appstream.patch --]
[-- Type: text/x-patch, Size: 5614 bytes --]

From bd8daa06c1d956e472e40b889e4724f13a0ad2cd Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <rg@raghavgururajan.name>
Date: Thu, 14 Jan 2021 23:32:27 -0500
Subject: [PATCH 1/2] gnu: Add appstream.

* gnu/packages/freedesktop.scm (appstream): New variable.
---
 gnu/packages/freedesktop.scm | 96 ++++++++++++++++++++++++++++++++++++
 1 file changed, 96 insertions(+)

diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index e00454f7b3..bccd8e9b00 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -58,8 +58,10 @@
   #:use-module (gnu packages bash)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
+  #:use-module (gnu packages cmake)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages cryptsetup)
+  #:use-module (gnu packages databases)
   #:use-module (gnu packages disk)
   #:use-module (gnu packages docbook)
   #:use-module (gnu packages documentation)
@@ -75,6 +77,7 @@
   #:use-module (gnu packages gstreamer)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages image)
+  #:use-module (gnu packages language)
   #:use-module (gnu packages libffi)
   #:use-module (gnu packages libunwind)
   #:use-module (gnu packages libusb)
@@ -101,6 +104,99 @@
   #:use-module (gnu packages xorg)
   #:use-module (srfi srfi-1))
 
+(define-public appstream
+  (package
+    (name "appstream")
+    (version "0.13.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append "https://www.freedesktop.org/software/"
+                       "appstream/releases/"
+                       "AppStream-" version ".tar.xz"))
+       (sha256
+        (base32 "09l6ixz1w29pi0nb0flz14m4r3f2hpqpp1fq8y66v9xa4c9fczds"))))
+    (build-system meson-build-system)
+    (arguments
+     `(#:glib-or-gtk? #t
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-libstemmer
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "meson.build"
+               (("/usr/include")
+                (string-append (assoc-ref inputs "libstemmer")
+                               "/include")))
+             #t))
+         (add-after 'patch-libstemmer 'patch-docbook-xml
+           (lambda* (#:key inputs #:allow-other-keys)
+             (with-directory-excursion "docs/api"
+               (substitute* "appstream-docs.xml"
+                 (("http://www.oasis-open.org/docbook/xml/4.3/")
+                  (string-append (assoc-ref inputs "docbook-xml-4.3")
+                                 "/xml/dtd/docbook/"))))
+             (for-each (lambda (file)
+                         (substitute* file
+                           (("http://www.oasis-open.org/docbook/xml/4.5/")
+                            (string-append (assoc-ref inputs "docbook-xml")
+                                           "/xml/dtd/docbook/"))))
+                       (find-files "scripts/desc" "\\.xml$"))
+             #t))
+         (add-after 'patch-docbook-xml 'disable-failing-tests
+           (lambda _
+             (substitute* "tests/test-pool.c"
+               (("	g_test_add_func \\(\"/AppStream/PoolRead\", test_pool_read\\);")
+                "")
+               (("	g_test_add_func \\(\"/AppStream/PoolReadAsync\", test_pool_read_async\\);")
+                "")
+               (("	g_test_add_func \\(\"/AppStream/PoolEmpty\", test_pool_empty\\);")
+                "")
+               (("	g_test_add_func \\(\"/AppStream/Cache\", test_cache\\);")
+                "")
+               (("	g_test_add_func \\(\"/AppStream/Merges\", test_merge_components\\);")
+                ""))
+             #t))
+         (add-after 'disable-failing-tests 'patch-install-dir
+           (lambda* (#:key outputs #:allow-other-keys)
+             (substitute* "data/meson.build"
+               (("/etc")
+                (string-append (assoc-ref outputs "out")
+                               "/etc")))
+             #t)))))
+    (native-inputs
+     `(("cmake" ,cmake)
+       ("docbook-xml-4.3" ,docbook-xml-4.3)
+       ("docbook-xml" ,docbook-xml)
+       ("docbook-xsl" ,docbook-xsl)
+       ("gettext" ,gettext-minimal)
+       ("glib:bin" ,glib "bin")
+       ("gobject-introspection" ,gobject-introspection)
+       ("gperf" ,gperf)
+       ("gtk-doc" ,gtk-doc)
+       ("pkg-config" ,pkg-config)
+       ("python" ,python-wrapper)
+       ("xsltproc" ,libxslt)))
+    (inputs
+     `(("libsoup" ,libsoup)
+       ("libstemmer" ,libstemmer)
+       ("libxml2" ,libxml2)
+       ("libyaml" ,libyaml)
+       ("lmdb" ,lmdb)))
+    (propagated-inputs
+     `(("glib" ,glib)))
+    (synopsis "Tools and libraries to work with AppStream metadata")
+    (description "AppStream is a cross-distribution effort for enhancing the way
+we interact with the software repositories provided by distributions by
+standardizing software component metadata.  It provides the foundation to build
+software-center applications, by providing metadata necessary for an
+application-centric view on package repositories.  It additionally provides
+specifications for things like an unified software metadata database, screenshot
+services and various other things needed to create user-friendly
+application-centers for distributions.")
+    (home-page "https://www.freedesktop.org/wiki/Distributions/AppStream/")
+    (license license:gpl2+)))
+
 (define-public farstream
   (package
     (name "farstream")
-- 
2.30.1


[-- Attachment #1.1.3: 0002-gnu-Add-nextcloud-client.patch --]
[-- Type: text/x-patch, Size: 7456 bytes --]

From 77584aedececd4f0e364c4a5673594fb8c113937 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <rg@raghavgururajan.name>
Date: Fri, 15 Jan 2021 05:04:31 -0500
Subject: [PATCH 2/2] gnu: Add nextcloud-client.

* gnu/packages/nextcloud.scm: New module.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
* gnu/packages/nextcloud.scm (nextcloud-client): New variable.
---
 gnu/local.mk               |   1 +
 gnu/packages/nextcloud.scm | 158 +++++++++++++++++++++++++++++++++++++
 2 files changed, 159 insertions(+)
 create mode 100644 gnu/packages/nextcloud.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index c3398c62fd..a9e0abe225 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -398,6 +398,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/netpbm.scm			\
   %D%/packages/nettle.scm			\
   %D%/packages/networking.scm			\
+  %D%/packages/nextcloud.scm              \
   %D%/packages/nfs.scm                          \
   %D%/packages/nickle.scm                       \
   %D%/packages/nicotine.scm                     \
diff --git a/gnu/packages/nextcloud.scm b/gnu/packages/nextcloud.scm
new file mode 100644
index 0000000000..38b3ea5e8f
--- /dev/null
+++ b/gnu/packages/nextcloud.scm
@@ -0,0 +1,158 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2021 Raghav Gururajan <rg@raghavgururajan.name>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages nextcloud)
+  #:use-module (gnu packages)
+  #:use-module (gnu packages check)
+  #:use-module (gnu packages compression)
+  #:use-module (gnu packages documentation)
+  #:use-module (gnu packages freedesktop)
+  #:use-module (gnu packages glib)
+  #:use-module (gnu packages gnome)
+  #:use-module (gnu packages graphviz)
+  #:use-module (gnu packages kde-frameworks)
+  #:use-module (gnu packages perl)
+  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages python)
+  #:use-module (gnu packages python-xyz)
+  #:use-module (gnu packages qt)
+  #:use-module (gnu packages ruby)
+  #:use-module (gnu packages sphinx)
+  #:use-module (gnu packages sqlite)
+  #:use-module (gnu packages tls)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix packages)
+  #:use-module (guix git-download)
+  #:use-module (guix build-system glib-or-gtk)
+  #:use-module (guix build-system qt))
+
+(define-public nextcloud-client
+  (package
+    (name "nextcloud-client")
+    (version "3.1.2")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://github.com/nextcloud/desktop")
+         (commit
+          (string-append "v" version))))
+       (file-name
+        (git-file-name name version))
+       (sha256
+        (base32 "10f9kmbn7s3hlkg1pv4kjflzh0159psrilci56kg4s2m49andhbs"))
+       (modules '((guix build utils)
+                  (ice-9 ftw)
+                  (srfi srfi-1)))
+       (snippet
+        `(begin
+           (let ((keep '( ;; Not available in Guix.
+                         "QProgressIndicator"
+                         "kmessagewidget" "qtlockedfile"
+                         "qtokenizer" "qtsingleapplication")))
+             (with-directory-excursion "src/3rdparty"
+               (for-each delete-file-recursively
+                         (lset-difference string=?
+                                          (scandir ".")
+                                          (cons* "." ".." keep))))
+             #t)))))
+    (build-system qt-build-system)
+    (arguments
+     `(#:configure-flags
+       (list
+        "-DUNIT_TESTING=ON"
+        ;; Upstream Bug: https://github.com/nextcloud/desktop/issues/2885
+        "-DNO_SHIBBOLETH=ON")
+       #: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))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-plugin-dirs
+           (lambda* (#:key outputs #:allow-other-keys)
+             ;; Patch install directory for dbus service files.
+             (substitute* "shell_integration/libcloudproviders/CMakeLists.txt"
+               (("PKGCONFIG_GETVAR\\(.+ _install_dir\\)")
+                "set(_install_dir \"${CMAKE_INSTALL_PREFIX}/share/dbus-1/services\")"))
+             ;; Make sure, that Qt modules are installed under $prefix.
+             (substitute* "shell_integration/dolphin/CMakeLists.txt"
+               (("ON CACHE")
+                "OFF CACHE"))
+             #t))
+         (add-before 'check 'pre-check
+           (lambda _
+             ;; 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)))))
+    (native-inputs
+     `(("cmocka" ,cmocka)
+       ("dot" ,graphviz)
+       ("doxygen" ,doxygen)
+       ("extra-cmake-modules" ,extra-cmake-modules)
+       ("glib:bin" ,glib "bin")
+       ("perl" ,perl)
+       ("pkg-config" ,pkg-config)
+       ("python" ,python-wrapper)
+       ("qttools" ,qttools)
+       ("ruby" ,ruby)))
+    (inputs
+     `(("appstream" ,appstream)
+       ("glib" ,glib)
+       ("kconfig" ,kconfig)
+       ("kcoreaddons" ,kcoreaddons)
+       ("kio" ,kio)
+       ("kjs" ,kjs)
+       ("libcloudproviders" ,libcloudproviders)
+       ("libzip" ,libzip)
+       ("openssl" ,openssl)
+       ("python-nautilus" ,python-nautilus)
+       ("qtbase" ,qtbase)
+       ("qtdeclarative" ,qtdeclarative)
+       ("qtgraphicaleffects" ,qtgraphicaleffects)
+       ("qtkeychain" ,qtkeychain)
+       ("qtquickcontrols2" ,qtquickcontrols2)
+       ("qtsvg" ,qtsvg)
+       ("qtwebchannel" ,qtwebchannel)
+       ("qtwebsockets" ,qtwebsockets)
+       ("qtwebkit" ,qtwebkit)
+       ("sqlite" ,sqlite)
+       ("zlib" ,zlib)))
+    (propagated-inputs
+     `(("qtwebengine" ,qtwebengine)))
+    (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/install/#install-clients")
+    (license
+     (list
+      ;; QtProgressIndicator
+      license:expat
+      ;; All ThirdParty (except QtProgressIndicator)
+      license:lgpl2.1+
+      ;; Others
+      license:gpl2+))))
-- 
2.30.1


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [bug#45889] Nextcloud Client (v10)
  2021-02-18 20:23             ` [bug#45889] Nextcloud Client (v10) Raghav Gururajan via Guix-patches via
@ 2021-02-18 22:26               ` Leo Prikler
  2021-02-21 17:04                 ` Raghav Gururajan via Guix-patches via
  0 siblings, 1 reply; 44+ messages in thread
From: Leo Prikler @ 2021-02-18 22:26 UTC (permalink / raw)
  To: Raghav Gururajan, 45889

Hi Raghav!

Am Donnerstag, den 18.02.2021, 15:23 -0500 schrieb Raghav Gururajan:
> Hi Leo!
> 
> > Interesting.  Is this due to CMakeLists picking up, that they're
> > missing and not replacing them with core stuff?
> > 
> > Perhaps you can patch the CMakeLists to add such support?
> > Alternatively, you might want to delete them and unpack the
> > upstream
> > ones to their locations.
> 
> I have asked upstream and they are looking into providing options to
> use 
> distribution packages. 
> https://github.com/nextcloud/desktop/issues/2929#issuecomment-780548919
Good to know.

> So once they update the source in the next-release, I will update
> the 
> package and remove the 3rdparty directory completely. :-)
In the meantime, would you mind packaging those 3rdparty sources from
their respective origins and add them in at build time?  That way, all
we'd need to transition from pseudo-unbundled to actually unbundled
would be to drop one phase.

> > Note, that you're missing a space here.  This would also match
> > PKGCONFIG_GETVAR(pkg var foobar_install_dir).
> 
> Changed in v10.
LGTM.

Regards,
Leo





^ permalink raw reply	[flat|nested] 44+ messages in thread

* [bug#45889] Nextcloud Client (v10)
  2021-02-18 22:26               ` Leo Prikler
@ 2021-02-21 17:04                 ` Raghav Gururajan via Guix-patches via
  2021-02-21 17:45                   ` Leo Prikler
  0 siblings, 1 reply; 44+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-02-21 17:04 UTC (permalink / raw)
  To: Leo Prikler, 45889


[-- Attachment #1.1: Type: text/plain, Size: 606 bytes --]

Hi Leo!

> In the meantime, would you mind packaging those 3rdparty sources from
> their respective origins and add them in at build time?  That way, all
> we'd need to transition from pseudo-unbundled to actually unbundled
> would be to drop one phase.

I was about to start doing it via 'copy-inputs, then noticed the source 
content differs with the ones at QtSolutions. The files of 
QtSingleApplication and QtLockedFile at QtSolutions were not modified 
for many years, whereas, the files of QtSingleApplication and 
QtLockedFile at nextcloud was last modified in 2020.

Regards,
RG.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

^ permalink raw reply	[flat|nested] 44+ messages in thread

* [bug#45889] Nextcloud Client (v10)
  2021-02-21 17:04                 ` Raghav Gururajan via Guix-patches via
@ 2021-02-21 17:45                   ` Leo Prikler
  2021-02-21 18:09                     ` [bug#45889] Nextcloud Client (v11) Raghav Gururajan via Guix-patches via
  0 siblings, 1 reply; 44+ messages in thread
From: Leo Prikler @ 2021-02-21 17:45 UTC (permalink / raw)
  To: Raghav Gururajan, 45889

Hi Raghav,

Am Sonntag, den 21.02.2021, 12:04 -0500 schrieb Raghav Gururajan:
> Hi Leo!
> 
> > In the meantime, would you mind packaging those 3rdparty sources
> > from
> > their respective origins and add them in at build time?  That way,
> > all
> > we'd need to transition from pseudo-unbundled to actually unbundled
> > would be to drop one phase.
> 
> I was about to start doing it via 'copy-inputs, then noticed the
> source 
> content differs with the ones at QtSolutions. The files of 
> QtSingleApplication and QtLockedFile at QtSolutions were not
> modified 
> for many years, whereas, the files of QtSingleApplication and 
> QtLockedFile at nextcloud was last modified in 2020.
Looking at QtSingleApplication, the changes made by Nextcloud seem
rather cosmetic, so packaging the upstream version, which also had
"cosmetic" changes to it since their shared ancestor should not be an
issue.

Regards,
Leo





^ permalink raw reply	[flat|nested] 44+ messages in thread

* [bug#45889] Nextcloud Client (v11)
  2021-02-21 17:45                   ` Leo Prikler
@ 2021-02-21 18:09                     ` Raghav Gururajan via Guix-patches via
  2021-02-21 18:22                       ` Leo Prikler
  2021-02-21 18:22                       ` [bug#45889] Nextcloud Client (v11) Raghav Gururajan via Guix-patches via
  0 siblings, 2 replies; 44+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-02-21 18:09 UTC (permalink / raw)
  To: Leo Prikler, 45889


[-- Attachment #1.1.1: Type: text/plain, Size: 287 bytes --]

Hi Leo!

> Looking at QtSingleApplication, the changes made by Nextcloud seem
> rather cosmetic, so packaging the upstream version, which also had
> "cosmetic" changes to it since their shared ancestor should not be an
> issue.

Ah Cool!

I have attached v11.

Regards,
RG.

[-- Attachment #1.1.2: 0002-gnu-Add-appstream.patch --]
[-- Type: text/x-patch, Size: 5614 bytes --]

From bd8daa06c1d956e472e40b889e4724f13a0ad2cd Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <rg@raghavgururajan.name>
Date: Thu, 14 Jan 2021 23:32:27 -0500
Subject: [PATCH 2/3] gnu: Add appstream.

* gnu/packages/freedesktop.scm (appstream): New variable.
---
 gnu/packages/freedesktop.scm | 96 ++++++++++++++++++++++++++++++++++++
 1 file changed, 96 insertions(+)

diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index e00454f7b3..bccd8e9b00 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -58,8 +58,10 @@
   #:use-module (gnu packages bash)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
+  #:use-module (gnu packages cmake)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages cryptsetup)
+  #:use-module (gnu packages databases)
   #:use-module (gnu packages disk)
   #:use-module (gnu packages docbook)
   #:use-module (gnu packages documentation)
@@ -75,6 +77,7 @@
   #:use-module (gnu packages gstreamer)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages image)
+  #:use-module (gnu packages language)
   #:use-module (gnu packages libffi)
   #:use-module (gnu packages libunwind)
   #:use-module (gnu packages libusb)
@@ -101,6 +104,99 @@
   #:use-module (gnu packages xorg)
   #:use-module (srfi srfi-1))
 
+(define-public appstream
+  (package
+    (name "appstream")
+    (version "0.13.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append "https://www.freedesktop.org/software/"
+                       "appstream/releases/"
+                       "AppStream-" version ".tar.xz"))
+       (sha256
+        (base32 "09l6ixz1w29pi0nb0flz14m4r3f2hpqpp1fq8y66v9xa4c9fczds"))))
+    (build-system meson-build-system)
+    (arguments
+     `(#:glib-or-gtk? #t
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-libstemmer
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "meson.build"
+               (("/usr/include")
+                (string-append (assoc-ref inputs "libstemmer")
+                               "/include")))
+             #t))
+         (add-after 'patch-libstemmer 'patch-docbook-xml
+           (lambda* (#:key inputs #:allow-other-keys)
+             (with-directory-excursion "docs/api"
+               (substitute* "appstream-docs.xml"
+                 (("http://www.oasis-open.org/docbook/xml/4.3/")
+                  (string-append (assoc-ref inputs "docbook-xml-4.3")
+                                 "/xml/dtd/docbook/"))))
+             (for-each (lambda (file)
+                         (substitute* file
+                           (("http://www.oasis-open.org/docbook/xml/4.5/")
+                            (string-append (assoc-ref inputs "docbook-xml")
+                                           "/xml/dtd/docbook/"))))
+                       (find-files "scripts/desc" "\\.xml$"))
+             #t))
+         (add-after 'patch-docbook-xml 'disable-failing-tests
+           (lambda _
+             (substitute* "tests/test-pool.c"
+               (("	g_test_add_func \\(\"/AppStream/PoolRead\", test_pool_read\\);")
+                "")
+               (("	g_test_add_func \\(\"/AppStream/PoolReadAsync\", test_pool_read_async\\);")
+                "")
+               (("	g_test_add_func \\(\"/AppStream/PoolEmpty\", test_pool_empty\\);")
+                "")
+               (("	g_test_add_func \\(\"/AppStream/Cache\", test_cache\\);")
+                "")
+               (("	g_test_add_func \\(\"/AppStream/Merges\", test_merge_components\\);")
+                ""))
+             #t))
+         (add-after 'disable-failing-tests 'patch-install-dir
+           (lambda* (#:key outputs #:allow-other-keys)
+             (substitute* "data/meson.build"
+               (("/etc")
+                (string-append (assoc-ref outputs "out")
+                               "/etc")))
+             #t)))))
+    (native-inputs
+     `(("cmake" ,cmake)
+       ("docbook-xml-4.3" ,docbook-xml-4.3)
+       ("docbook-xml" ,docbook-xml)
+       ("docbook-xsl" ,docbook-xsl)
+       ("gettext" ,gettext-minimal)
+       ("glib:bin" ,glib "bin")
+       ("gobject-introspection" ,gobject-introspection)
+       ("gperf" ,gperf)
+       ("gtk-doc" ,gtk-doc)
+       ("pkg-config" ,pkg-config)
+       ("python" ,python-wrapper)
+       ("xsltproc" ,libxslt)))
+    (inputs
+     `(("libsoup" ,libsoup)
+       ("libstemmer" ,libstemmer)
+       ("libxml2" ,libxml2)
+       ("libyaml" ,libyaml)
+       ("lmdb" ,lmdb)))
+    (propagated-inputs
+     `(("glib" ,glib)))
+    (synopsis "Tools and libraries to work with AppStream metadata")
+    (description "AppStream is a cross-distribution effort for enhancing the way
+we interact with the software repositories provided by distributions by
+standardizing software component metadata.  It provides the foundation to build
+software-center applications, by providing metadata necessary for an
+application-centric view on package repositories.  It additionally provides
+specifications for things like an unified software metadata database, screenshot
+services and various other things needed to create user-friendly
+application-centers for distributions.")
+    (home-page "https://www.freedesktop.org/wiki/Distributions/AppStream/")
+    (license license:gpl2+)))
+
 (define-public farstream
   (package
     (name "farstream")
-- 
2.30.1


[-- Attachment #1.1.3: 0003-gnu-Add-nextcloud-client.patch --]
[-- Type: text/x-patch, Size: 7456 bytes --]

From a6601db8975105332bfe322353ae045fff461928 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <rg@raghavgururajan.name>
Date: Fri, 15 Jan 2021 05:04:31 -0500
Subject: [PATCH 3/3] gnu: Add nextcloud-client.

* gnu/packages/nextcloud.scm: New module.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
* gnu/packages/nextcloud.scm (nextcloud-client): New variable.
---
 gnu/local.mk               |   1 +
 gnu/packages/nextcloud.scm | 158 +++++++++++++++++++++++++++++++++++++
 2 files changed, 159 insertions(+)
 create mode 100644 gnu/packages/nextcloud.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index c3398c62fd..a9e0abe225 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -398,6 +398,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/netpbm.scm			\
   %D%/packages/nettle.scm			\
   %D%/packages/networking.scm			\
+  %D%/packages/nextcloud.scm              \
   %D%/packages/nfs.scm                          \
   %D%/packages/nickle.scm                       \
   %D%/packages/nicotine.scm                     \
diff --git a/gnu/packages/nextcloud.scm b/gnu/packages/nextcloud.scm
new file mode 100644
index 0000000000..38b3ea5e8f
--- /dev/null
+++ b/gnu/packages/nextcloud.scm
@@ -0,0 +1,158 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2021 Raghav Gururajan <rg@raghavgururajan.name>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages nextcloud)
+  #:use-module (gnu packages)
+  #:use-module (gnu packages check)
+  #:use-module (gnu packages compression)
+  #:use-module (gnu packages documentation)
+  #:use-module (gnu packages freedesktop)
+  #:use-module (gnu packages glib)
+  #:use-module (gnu packages gnome)
+  #:use-module (gnu packages graphviz)
+  #:use-module (gnu packages kde-frameworks)
+  #:use-module (gnu packages perl)
+  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages python)
+  #:use-module (gnu packages python-xyz)
+  #:use-module (gnu packages qt)
+  #:use-module (gnu packages ruby)
+  #:use-module (gnu packages sphinx)
+  #:use-module (gnu packages sqlite)
+  #:use-module (gnu packages tls)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix packages)
+  #:use-module (guix git-download)
+  #:use-module (guix build-system glib-or-gtk)
+  #:use-module (guix build-system qt))
+
+(define-public nextcloud-client
+  (package
+    (name "nextcloud-client")
+    (version "3.1.2")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://github.com/nextcloud/desktop")
+         (commit
+          (string-append "v" version))))
+       (file-name
+        (git-file-name name version))
+       (sha256
+        (base32 "10f9kmbn7s3hlkg1pv4kjflzh0159psrilci56kg4s2m49andhbs"))
+       (modules '((guix build utils)
+                  (ice-9 ftw)
+                  (srfi srfi-1)))
+       (snippet
+        `(begin
+           (let ((keep '( ;; Not available in Guix.
+                         "QProgressIndicator"
+                         "kmessagewidget" "qtlockedfile"
+                         "qtokenizer" "qtsingleapplication")))
+             (with-directory-excursion "src/3rdparty"
+               (for-each delete-file-recursively
+                         (lset-difference string=?
+                                          (scandir ".")
+                                          (cons* "." ".." keep))))
+             #t)))))
+    (build-system qt-build-system)
+    (arguments
+     `(#:configure-flags
+       (list
+        "-DUNIT_TESTING=ON"
+        ;; Upstream Bug: https://github.com/nextcloud/desktop/issues/2885
+        "-DNO_SHIBBOLETH=ON")
+       #: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))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-plugin-dirs
+           (lambda* (#:key outputs #:allow-other-keys)
+             ;; Patch install directory for dbus service files.
+             (substitute* "shell_integration/libcloudproviders/CMakeLists.txt"
+               (("PKGCONFIG_GETVAR\\(.+ _install_dir\\)")
+                "set(_install_dir \"${CMAKE_INSTALL_PREFIX}/share/dbus-1/services\")"))
+             ;; Make sure, that Qt modules are installed under $prefix.
+             (substitute* "shell_integration/dolphin/CMakeLists.txt"
+               (("ON CACHE")
+                "OFF CACHE"))
+             #t))
+         (add-before 'check 'pre-check
+           (lambda _
+             ;; 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)))))
+    (native-inputs
+     `(("cmocka" ,cmocka)
+       ("dot" ,graphviz)
+       ("doxygen" ,doxygen)
+       ("extra-cmake-modules" ,extra-cmake-modules)
+       ("glib:bin" ,glib "bin")
+       ("perl" ,perl)
+       ("pkg-config" ,pkg-config)
+       ("python" ,python-wrapper)
+       ("qttools" ,qttools)
+       ("ruby" ,ruby)))
+    (inputs
+     `(("appstream" ,appstream)
+       ("glib" ,glib)
+       ("kconfig" ,kconfig)
+       ("kcoreaddons" ,kcoreaddons)
+       ("kio" ,kio)
+       ("kjs" ,kjs)
+       ("libcloudproviders" ,libcloudproviders)
+       ("libzip" ,libzip)
+       ("openssl" ,openssl)
+       ("python-nautilus" ,python-nautilus)
+       ("qtbase" ,qtbase)
+       ("qtdeclarative" ,qtdeclarative)
+       ("qtgraphicaleffects" ,qtgraphicaleffects)
+       ("qtkeychain" ,qtkeychain)
+       ("qtquickcontrols2" ,qtquickcontrols2)
+       ("qtsvg" ,qtsvg)
+       ("qtwebchannel" ,qtwebchannel)
+       ("qtwebsockets" ,qtwebsockets)
+       ("qtwebkit" ,qtwebkit)
+       ("sqlite" ,sqlite)
+       ("zlib" ,zlib)))
+    (propagated-inputs
+     `(("qtwebengine" ,qtwebengine)))
+    (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/install/#install-clients")
+    (license
+     (list
+      ;; QtProgressIndicator
+      license:expat
+      ;; All ThirdParty (except QtProgressIndicator)
+      license:lgpl2.1+
+      ;; Others
+      license:gpl2+))))
-- 
2.30.1


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [bug#45889] Nextcloud Client (v11)
  2021-02-21 18:09                     ` [bug#45889] Nextcloud Client (v11) Raghav Gururajan via Guix-patches via
@ 2021-02-21 18:22                       ` Leo Prikler
  2021-02-21 18:50                         ` [bug#45889] Nextcloud Client (v12) Raghav Gururajan via Guix-patches via
  2021-02-21 18:22                       ` [bug#45889] Nextcloud Client (v11) Raghav Gururajan via Guix-patches via
  1 sibling, 1 reply; 44+ messages in thread
From: Leo Prikler @ 2021-02-21 18:22 UTC (permalink / raw)
  To: Raghav Gururajan, 45889

Hi Raghav,

Am Sonntag, den 21.02.2021, 13:09 -0500 schrieb Raghav Gururajan:
> Hi Leo!
> 
> > Looking at QtSingleApplication, the changes made by Nextcloud seem
> > rather cosmetic, so packaging the upstream version, which also had
> > "cosmetic" changes to it since their shared ancestor should not be
> > an
> > issue.
> 
> Ah Cool!
Just in case I've been unclear, "upstream" here means "not bundled".

> I have attached v11.
Did you by chance mess up the patch numbering?

> +(define-module (gnu packages nextcloud)
I just now noticed, that this would be a good fit for sync, which
already hosts owncloud-client.

> +    (version "3.1.2")
For the record, upstream updated to 3.1.3 three days ago.  Time flies.

Regards,
Leo





^ permalink raw reply	[flat|nested] 44+ messages in thread

* [bug#45889] Nextcloud Client (v11)
  2021-02-21 18:09                     ` [bug#45889] Nextcloud Client (v11) Raghav Gururajan via Guix-patches via
  2021-02-21 18:22                       ` Leo Prikler
@ 2021-02-21 18:22                       ` Raghav Gururajan via Guix-patches via
  1 sibling, 0 replies; 44+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-02-21 18:22 UTC (permalink / raw)
  To: Leo Prikler, 45889


[-- Attachment #1.1.1: Type: text/plain, Size: 171 bytes --]

Hi Leo!

> I have attached v11.

Ignore v11. The build fails. There are missing classes in the 
QtSolutions source. So v10 is the viable patch-set.

Regards,
RG.

[-- Attachment #1.1.2: OpenPGP_0x5F5816647F8BE551.asc --]
[-- Type: application/pgp-keys, Size: 2649 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

^ permalink raw reply	[flat|nested] 44+ messages in thread

* [bug#45889] Nextcloud Client (v12)
  2021-02-21 18:22                       ` Leo Prikler
@ 2021-02-21 18:50                         ` Raghav Gururajan via Guix-patches via
  2021-02-21 19:37                           ` Leo Prikler
  0 siblings, 1 reply; 44+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-02-21 18:50 UTC (permalink / raw)
  To: Leo Prikler, 45889


[-- Attachment #1.1.1: Type: text/plain, Size: 476 bytes --]

Hi Leo!

>> +(define-module (gnu packages nextcloud)
> I just now noticed, that this would be a good fit for sync, which
> already hosts owncloud-client.

This new module is for nextcloud suite of packages. nextcloud-client, 
nextcloud-server, nextcloud-spreed, nextcloud-deck, nextcloud-news ... 
nextcloud-foobar.

>> +    (version "3.1.2")
> For the record, upstream updated to 3.1.3 three days ago.  Time flies.

Wow! Okay, I have made v12.

Regards,
RG.

[-- Attachment #1.1.2: 0001-gnu-Add-appstream.patch --]
[-- Type: text/x-patch, Size: 5614 bytes --]

From d4b271d3fcff56c27e6ee0222e688aad4b78a8eb Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <rg@raghavgururajan.name>
Date: Thu, 14 Jan 2021 23:32:27 -0500
Subject: [PATCH 1/2] gnu: Add appstream.

* gnu/packages/freedesktop.scm (appstream): New variable.
---
 gnu/packages/freedesktop.scm | 96 ++++++++++++++++++++++++++++++++++++
 1 file changed, 96 insertions(+)

diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index e00454f7b3..bccd8e9b00 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -58,8 +58,10 @@
   #:use-module (gnu packages bash)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
+  #:use-module (gnu packages cmake)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages cryptsetup)
+  #:use-module (gnu packages databases)
   #:use-module (gnu packages disk)
   #:use-module (gnu packages docbook)
   #:use-module (gnu packages documentation)
@@ -75,6 +77,7 @@
   #:use-module (gnu packages gstreamer)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages image)
+  #:use-module (gnu packages language)
   #:use-module (gnu packages libffi)
   #:use-module (gnu packages libunwind)
   #:use-module (gnu packages libusb)
@@ -101,6 +104,99 @@
   #:use-module (gnu packages xorg)
   #:use-module (srfi srfi-1))
 
+(define-public appstream
+  (package
+    (name "appstream")
+    (version "0.13.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append "https://www.freedesktop.org/software/"
+                       "appstream/releases/"
+                       "AppStream-" version ".tar.xz"))
+       (sha256
+        (base32 "09l6ixz1w29pi0nb0flz14m4r3f2hpqpp1fq8y66v9xa4c9fczds"))))
+    (build-system meson-build-system)
+    (arguments
+     `(#:glib-or-gtk? #t
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-libstemmer
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "meson.build"
+               (("/usr/include")
+                (string-append (assoc-ref inputs "libstemmer")
+                               "/include")))
+             #t))
+         (add-after 'patch-libstemmer 'patch-docbook-xml
+           (lambda* (#:key inputs #:allow-other-keys)
+             (with-directory-excursion "docs/api"
+               (substitute* "appstream-docs.xml"
+                 (("http://www.oasis-open.org/docbook/xml/4.3/")
+                  (string-append (assoc-ref inputs "docbook-xml-4.3")
+                                 "/xml/dtd/docbook/"))))
+             (for-each (lambda (file)
+                         (substitute* file
+                           (("http://www.oasis-open.org/docbook/xml/4.5/")
+                            (string-append (assoc-ref inputs "docbook-xml")
+                                           "/xml/dtd/docbook/"))))
+                       (find-files "scripts/desc" "\\.xml$"))
+             #t))
+         (add-after 'patch-docbook-xml 'disable-failing-tests
+           (lambda _
+             (substitute* "tests/test-pool.c"
+               (("	g_test_add_func \\(\"/AppStream/PoolRead\", test_pool_read\\);")
+                "")
+               (("	g_test_add_func \\(\"/AppStream/PoolReadAsync\", test_pool_read_async\\);")
+                "")
+               (("	g_test_add_func \\(\"/AppStream/PoolEmpty\", test_pool_empty\\);")
+                "")
+               (("	g_test_add_func \\(\"/AppStream/Cache\", test_cache\\);")
+                "")
+               (("	g_test_add_func \\(\"/AppStream/Merges\", test_merge_components\\);")
+                ""))
+             #t))
+         (add-after 'disable-failing-tests 'patch-install-dir
+           (lambda* (#:key outputs #:allow-other-keys)
+             (substitute* "data/meson.build"
+               (("/etc")
+                (string-append (assoc-ref outputs "out")
+                               "/etc")))
+             #t)))))
+    (native-inputs
+     `(("cmake" ,cmake)
+       ("docbook-xml-4.3" ,docbook-xml-4.3)
+       ("docbook-xml" ,docbook-xml)
+       ("docbook-xsl" ,docbook-xsl)
+       ("gettext" ,gettext-minimal)
+       ("glib:bin" ,glib "bin")
+       ("gobject-introspection" ,gobject-introspection)
+       ("gperf" ,gperf)
+       ("gtk-doc" ,gtk-doc)
+       ("pkg-config" ,pkg-config)
+       ("python" ,python-wrapper)
+       ("xsltproc" ,libxslt)))
+    (inputs
+     `(("libsoup" ,libsoup)
+       ("libstemmer" ,libstemmer)
+       ("libxml2" ,libxml2)
+       ("libyaml" ,libyaml)
+       ("lmdb" ,lmdb)))
+    (propagated-inputs
+     `(("glib" ,glib)))
+    (synopsis "Tools and libraries to work with AppStream metadata")
+    (description "AppStream is a cross-distribution effort for enhancing the way
+we interact with the software repositories provided by distributions by
+standardizing software component metadata.  It provides the foundation to build
+software-center applications, by providing metadata necessary for an
+application-centric view on package repositories.  It additionally provides
+specifications for things like an unified software metadata database, screenshot
+services and various other things needed to create user-friendly
+application-centers for distributions.")
+    (home-page "https://www.freedesktop.org/wiki/Distributions/AppStream/")
+    (license license:gpl2+)))
+
 (define-public farstream
   (package
     (name "farstream")
-- 
2.30.1


[-- Attachment #1.1.3: 0002-gnu-Add-nextcloud-client.patch --]
[-- Type: text/x-patch, Size: 7456 bytes --]

From e0b64a0f8198fb48201c17e9459df8cae1da7a04 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <rg@raghavgururajan.name>
Date: Fri, 15 Jan 2021 05:04:31 -0500
Subject: [PATCH 2/2] gnu: Add nextcloud-client.

* gnu/packages/nextcloud.scm: New module.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
* gnu/packages/nextcloud.scm (nextcloud-client): New variable.
---
 gnu/local.mk               |   1 +
 gnu/packages/nextcloud.scm | 158 +++++++++++++++++++++++++++++++++++++
 2 files changed, 159 insertions(+)
 create mode 100644 gnu/packages/nextcloud.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index c3398c62fd..a9e0abe225 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -398,6 +398,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/netpbm.scm			\
   %D%/packages/nettle.scm			\
   %D%/packages/networking.scm			\
+  %D%/packages/nextcloud.scm              \
   %D%/packages/nfs.scm                          \
   %D%/packages/nickle.scm                       \
   %D%/packages/nicotine.scm                     \
diff --git a/gnu/packages/nextcloud.scm b/gnu/packages/nextcloud.scm
new file mode 100644
index 0000000000..06a6f8fe20
--- /dev/null
+++ b/gnu/packages/nextcloud.scm
@@ -0,0 +1,158 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2021 Raghav Gururajan <rg@raghavgururajan.name>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages nextcloud)
+  #:use-module (gnu packages)
+  #:use-module (gnu packages check)
+  #:use-module (gnu packages compression)
+  #:use-module (gnu packages documentation)
+  #:use-module (gnu packages freedesktop)
+  #:use-module (gnu packages glib)
+  #:use-module (gnu packages gnome)
+  #:use-module (gnu packages graphviz)
+  #:use-module (gnu packages kde-frameworks)
+  #:use-module (gnu packages perl)
+  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages python)
+  #:use-module (gnu packages python-xyz)
+  #:use-module (gnu packages qt)
+  #:use-module (gnu packages ruby)
+  #:use-module (gnu packages sphinx)
+  #:use-module (gnu packages sqlite)
+  #:use-module (gnu packages tls)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix packages)
+  #:use-module (guix git-download)
+  #:use-module (guix build-system glib-or-gtk)
+  #:use-module (guix build-system qt))
+
+(define-public nextcloud-client
+  (package
+    (name "nextcloud-client")
+    (version "3.1.3")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://github.com/nextcloud/desktop")
+         (commit
+          (string-append "v" version))))
+       (file-name
+        (git-file-name name version))
+       (sha256
+        (base32 "15ymk3gvfmgwzmqbhlw7jjy9y65ib3391h1dlmpll65iaj2miajk"))
+       (modules '((guix build utils)
+                  (ice-9 ftw)
+                  (srfi srfi-1)))
+       (snippet
+        `(begin
+           (let ((keep '( ;; Not available in Guix.
+                         "QProgressIndicator"
+                         "kmessagewidget" "qtlockedfile"
+                         "qtokenizer" "qtsingleapplication")))
+             (with-directory-excursion "src/3rdparty"
+               (for-each delete-file-recursively
+                         (lset-difference string=?
+                                          (scandir ".")
+                                          (cons* "." ".." keep))))
+             #t)))))
+    (build-system qt-build-system)
+    (arguments
+     `(#:configure-flags
+       (list
+        "-DUNIT_TESTING=ON"
+        ;; Upstream Bug: https://github.com/nextcloud/desktop/issues/2885
+        "-DNO_SHIBBOLETH=ON")
+       #: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))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-plugin-dirs
+           (lambda* (#:key outputs #:allow-other-keys)
+             ;; Patch install directory for dbus service files.
+             (substitute* "shell_integration/libcloudproviders/CMakeLists.txt"
+               (("PKGCONFIG_GETVAR\\(.+ _install_dir\\)")
+                "set(_install_dir \"${CMAKE_INSTALL_PREFIX}/share/dbus-1/services\")"))
+             ;; Make sure, that Qt modules are installed under $prefix.
+             (substitute* "shell_integration/dolphin/CMakeLists.txt"
+               (("ON CACHE")
+                "OFF CACHE"))
+             #t))
+         (add-before 'check 'pre-check
+           (lambda _
+             ;; 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)))))
+    (native-inputs
+     `(("cmocka" ,cmocka)
+       ("dot" ,graphviz)
+       ("doxygen" ,doxygen)
+       ("extra-cmake-modules" ,extra-cmake-modules)
+       ("glib:bin" ,glib "bin")
+       ("perl" ,perl)
+       ("pkg-config" ,pkg-config)
+       ("python" ,python-wrapper)
+       ("qttools" ,qttools)
+       ("ruby" ,ruby)))
+    (inputs
+     `(("appstream" ,appstream)
+       ("glib" ,glib)
+       ("kconfig" ,kconfig)
+       ("kcoreaddons" ,kcoreaddons)
+       ("kio" ,kio)
+       ("kjs" ,kjs)
+       ("libcloudproviders" ,libcloudproviders)
+       ("libzip" ,libzip)
+       ("openssl" ,openssl)
+       ("python-nautilus" ,python-nautilus)
+       ("qtbase" ,qtbase)
+       ("qtdeclarative" ,qtdeclarative)
+       ("qtgraphicaleffects" ,qtgraphicaleffects)
+       ("qtkeychain" ,qtkeychain)
+       ("qtquickcontrols2" ,qtquickcontrols2)
+       ("qtsvg" ,qtsvg)
+       ("qtwebchannel" ,qtwebchannel)
+       ("qtwebsockets" ,qtwebsockets)
+       ("qtwebkit" ,qtwebkit)
+       ("sqlite" ,sqlite)
+       ("zlib" ,zlib)))
+    (propagated-inputs
+     `(("qtwebengine" ,qtwebengine)))
+    (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/install/#install-clients")
+    (license
+     (list
+      ;; QtProgressIndicator
+      license:expat
+      ;; All ThirdParty (except QtProgressIndicator)
+      license:lgpl2.1+
+      ;; Others
+      license:gpl2+))))
-- 
2.30.1


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [bug#45889] Nextcloud Client (v12)
  2021-02-21 18:50                         ` [bug#45889] Nextcloud Client (v12) Raghav Gururajan via Guix-patches via
@ 2021-02-21 19:37                           ` Leo Prikler
  2021-02-22 17:29                             ` [bug#45889] Nextcloud Client (v13) Raghav Gururajan via Guix-patches via
  0 siblings, 1 reply; 44+ messages in thread
From: Leo Prikler @ 2021-02-21 19:37 UTC (permalink / raw)
  To: Raghav Gururajan, 45889

Am Sonntag, den 21.02.2021, 13:50 -0500 schrieb Raghav Gururajan:
> Hi Leo!
> 
> > > +(define-module (gnu packages nextcloud)
> > I just now noticed, that this would be a good fit for sync, which
> > already hosts owncloud-client.
> 
> This new module is for nextcloud suite of packages. nextcloud-
> client, 
> nextcloud-server, nextcloud-spreed, nextcloud-deck, nextcloud-news
> ... 
> nextcloud-foobar.
Still seems pretty sync to me, especially since it's just the client
for now.

> There are missing classes in the QtSolutions source.
(X) Doubt

It appears the Nextcloud variant has an added namespace layer, that one
should easily be able to strip via substitute*.  I do wonder where that
comes from, though, it seems to have been there "forever".

Regards,
Leo





^ permalink raw reply	[flat|nested] 44+ messages in thread

* [bug#45889] Nextcloud Client (v13)
  2021-02-21 19:37                           ` Leo Prikler
@ 2021-02-22 17:29                             ` Raghav Gururajan via Guix-patches via
  2021-02-23 14:27                               ` [bug#45889] Nextcloud Client (v14) Raghav Gururajan via Guix-patches via
  0 siblings, 1 reply; 44+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-02-22 17:29 UTC (permalink / raw)
  To: Leo Prikler, 45889


[-- Attachment #1.1.1: Type: text/plain, Size: 681 bytes --]

Hi Leo!

> Still seems pretty sync to me, especially since it's just the client
> for now.

Circular-dependency when putting it in sync.scm. So we'll keep it as is 
I guess.

> (X) Doubt
> 
> It appears the Nextcloud variant has an added namespace layer, that one
> should easily be able to strip via substitute*.  I do wonder where that
> comes from, though, it seems to have been there "forever".

No idea! Thanks for fixing the build errors.

Also, I cannot package them separately because the build script is not 
viable. No libraries gets built, except for .o files. Also, INSTALL.txt 
deals with Windows and MacOS.

I have attached v13.

Regards,
RG.

[-- Attachment #1.1.2: 0001-gnu-Add-appstream.patch --]
[-- Type: text/x-patch, Size: 5614 bytes --]

From d4b271d3fcff56c27e6ee0222e688aad4b78a8eb Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <rg@raghavgururajan.name>
Date: Thu, 14 Jan 2021 23:32:27 -0500
Subject: [PATCH 1/2] gnu: Add appstream.

* gnu/packages/freedesktop.scm (appstream): New variable.
---
 gnu/packages/freedesktop.scm | 96 ++++++++++++++++++++++++++++++++++++
 1 file changed, 96 insertions(+)

diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index e00454f7b3..bccd8e9b00 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -58,8 +58,10 @@
   #:use-module (gnu packages bash)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
+  #:use-module (gnu packages cmake)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages cryptsetup)
+  #:use-module (gnu packages databases)
   #:use-module (gnu packages disk)
   #:use-module (gnu packages docbook)
   #:use-module (gnu packages documentation)
@@ -75,6 +77,7 @@
   #:use-module (gnu packages gstreamer)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages image)
+  #:use-module (gnu packages language)
   #:use-module (gnu packages libffi)
   #:use-module (gnu packages libunwind)
   #:use-module (gnu packages libusb)
@@ -101,6 +104,99 @@
   #:use-module (gnu packages xorg)
   #:use-module (srfi srfi-1))
 
+(define-public appstream
+  (package
+    (name "appstream")
+    (version "0.13.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append "https://www.freedesktop.org/software/"
+                       "appstream/releases/"
+                       "AppStream-" version ".tar.xz"))
+       (sha256
+        (base32 "09l6ixz1w29pi0nb0flz14m4r3f2hpqpp1fq8y66v9xa4c9fczds"))))
+    (build-system meson-build-system)
+    (arguments
+     `(#:glib-or-gtk? #t
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-libstemmer
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "meson.build"
+               (("/usr/include")
+                (string-append (assoc-ref inputs "libstemmer")
+                               "/include")))
+             #t))
+         (add-after 'patch-libstemmer 'patch-docbook-xml
+           (lambda* (#:key inputs #:allow-other-keys)
+             (with-directory-excursion "docs/api"
+               (substitute* "appstream-docs.xml"
+                 (("http://www.oasis-open.org/docbook/xml/4.3/")
+                  (string-append (assoc-ref inputs "docbook-xml-4.3")
+                                 "/xml/dtd/docbook/"))))
+             (for-each (lambda (file)
+                         (substitute* file
+                           (("http://www.oasis-open.org/docbook/xml/4.5/")
+                            (string-append (assoc-ref inputs "docbook-xml")
+                                           "/xml/dtd/docbook/"))))
+                       (find-files "scripts/desc" "\\.xml$"))
+             #t))
+         (add-after 'patch-docbook-xml 'disable-failing-tests
+           (lambda _
+             (substitute* "tests/test-pool.c"
+               (("	g_test_add_func \\(\"/AppStream/PoolRead\", test_pool_read\\);")
+                "")
+               (("	g_test_add_func \\(\"/AppStream/PoolReadAsync\", test_pool_read_async\\);")
+                "")
+               (("	g_test_add_func \\(\"/AppStream/PoolEmpty\", test_pool_empty\\);")
+                "")
+               (("	g_test_add_func \\(\"/AppStream/Cache\", test_cache\\);")
+                "")
+               (("	g_test_add_func \\(\"/AppStream/Merges\", test_merge_components\\);")
+                ""))
+             #t))
+         (add-after 'disable-failing-tests 'patch-install-dir
+           (lambda* (#:key outputs #:allow-other-keys)
+             (substitute* "data/meson.build"
+               (("/etc")
+                (string-append (assoc-ref outputs "out")
+                               "/etc")))
+             #t)))))
+    (native-inputs
+     `(("cmake" ,cmake)
+       ("docbook-xml-4.3" ,docbook-xml-4.3)
+       ("docbook-xml" ,docbook-xml)
+       ("docbook-xsl" ,docbook-xsl)
+       ("gettext" ,gettext-minimal)
+       ("glib:bin" ,glib "bin")
+       ("gobject-introspection" ,gobject-introspection)
+       ("gperf" ,gperf)
+       ("gtk-doc" ,gtk-doc)
+       ("pkg-config" ,pkg-config)
+       ("python" ,python-wrapper)
+       ("xsltproc" ,libxslt)))
+    (inputs
+     `(("libsoup" ,libsoup)
+       ("libstemmer" ,libstemmer)
+       ("libxml2" ,libxml2)
+       ("libyaml" ,libyaml)
+       ("lmdb" ,lmdb)))
+    (propagated-inputs
+     `(("glib" ,glib)))
+    (synopsis "Tools and libraries to work with AppStream metadata")
+    (description "AppStream is a cross-distribution effort for enhancing the way
+we interact with the software repositories provided by distributions by
+standardizing software component metadata.  It provides the foundation to build
+software-center applications, by providing metadata necessary for an
+application-centric view on package repositories.  It additionally provides
+specifications for things like an unified software metadata database, screenshot
+services and various other things needed to create user-friendly
+application-centers for distributions.")
+    (home-page "https://www.freedesktop.org/wiki/Distributions/AppStream/")
+    (license license:gpl2+)))
+
 (define-public farstream
   (package
     (name "farstream")
-- 
2.30.1


[-- Attachment #1.1.3: 0002-gnu-Add-nextcloud-client.patch --]
[-- Type: text/x-patch, Size: 8908 bytes --]

From dd9028ea1babf23ad23c08d19c8146c77e937479 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <rg@raghavgururajan.name>
Date: Fri, 15 Jan 2021 05:04:31 -0500
Subject: [PATCH 2/2] gnu: Add nextcloud-client.

* gnu/packages/nextcloud.scm: New module.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
* gnu/packages/nextcloud.scm (nextcloud-client): New variable.
---
 gnu/local.mk               |   1 +
 gnu/packages/nextcloud.scm | 190 +++++++++++++++++++++++++++++++++++++
 2 files changed, 191 insertions(+)
 create mode 100644 gnu/packages/nextcloud.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index c3398c62fd..a9e0abe225 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -398,6 +398,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/netpbm.scm			\
   %D%/packages/nettle.scm			\
   %D%/packages/networking.scm			\
+  %D%/packages/nextcloud.scm              \
   %D%/packages/nfs.scm                          \
   %D%/packages/nickle.scm                       \
   %D%/packages/nicotine.scm                     \
diff --git a/gnu/packages/nextcloud.scm b/gnu/packages/nextcloud.scm
new file mode 100644
index 0000000000..d172f3214f
--- /dev/null
+++ b/gnu/packages/nextcloud.scm
@@ -0,0 +1,190 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2021 Raghav Gururajan <rg@raghavgururajan.name>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages nextcloud)
+  #:use-module (gnu packages)
+  #:use-module (gnu packages check)
+  #:use-module (gnu packages compression)
+  #:use-module (gnu packages documentation)
+  #:use-module (gnu packages freedesktop)
+  #:use-module (gnu packages glib)
+  #:use-module (gnu packages gnome)
+  #:use-module (gnu packages graphviz)
+  #:use-module (gnu packages kde-frameworks)
+  #:use-module (gnu packages perl)
+  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages python)
+  #:use-module (gnu packages python-xyz)
+  #:use-module (gnu packages qt)
+  #:use-module (gnu packages ruby)
+  #:use-module (gnu packages sphinx)
+  #:use-module (gnu packages sqlite)
+  #:use-module (gnu packages tls)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix packages)
+  #:use-module (guix git-download)
+  #:use-module (guix build-system glib-or-gtk)
+  #:use-module (guix build-system qt))
+
+(define-public nextcloud-client
+  (package
+    (name "nextcloud-client")
+    (version "3.1.3")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://github.com/nextcloud/desktop")
+         (commit
+          (string-append "v" version))))
+       (file-name
+        (git-file-name name version))
+       (sha256
+        (base32 "15ymk3gvfmgwzmqbhlw7jjy9y65ib3391h1dlmpll65iaj2miajk"))
+       (modules '((guix build utils)
+                  (ice-9 ftw)
+                  (srfi srfi-1)))
+       (snippet
+        `(begin
+           (let ((keep '( ;; Not available in Guix.
+                         "QProgressIndicator"
+                         "kmessagewidget" "qtokenizer")))
+             (with-directory-excursion "src/3rdparty"
+               (for-each delete-file-recursively
+                         (lset-difference string=?
+                                          (scandir ".")
+                                          (cons* "." ".." keep))))
+             #t)))))
+    (build-system qt-build-system)
+    (arguments
+     `(#:configure-flags
+       (list
+        "-DUNIT_TESTING=ON"
+        ;; Upstream Bug: https://github.com/nextcloud/desktop/issues/2885
+        "-DNO_SHIBBOLETH=ON")
+       #: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))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-source
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((qtsolutions (assoc-ref inputs "qtsolutions")))
+               (for-each
+                (lambda (dir)
+                  (copy-recursively
+                   (string-append qtsolutions "/" dir "/src")
+                   (string-append "src/3rdparty/" dir)))
+                '("qtlockedfile" "qtsingleapplication")))
+             (with-directory-excursion "src/gui"
+               (substitute* `("application.h" "application.cpp")
+                 (("SharedTools::QtSingleApplication") "QtSingleApplication")
+                 (("slotParseMessage\\(const QString &(msg)?.*\\)")
+                  "slotParseMessage(const QString &msg)")))
+             #t))
+         (add-after 'unpack 'patch-cmake
+           (lambda* (#:key outputs #:allow-other-keys)
+             ;; Patch install directory for dbus service files.
+             (substitute* "shell_integration/libcloudproviders/CMakeLists.txt"
+               (("PKGCONFIG_GETVAR\\(.+ _install_dir\\)")
+                "set(_install_dir \"${CMAKE_INSTALL_PREFIX}/share/dbus-1/services\")"))
+             ;; Make sure, that Qt modules are installed under $prefix.
+             (substitute* "shell_integration/dolphin/CMakeLists.txt"
+               (("ON CACHE")
+                "OFF CACHE"))
+             #t))
+         (add-after 'patch-plugin-dirs 'fix-build
+           (lambda _
+             (with-directory-excursion "src/gui"
+               (substitute* `("application.h" "application.cpp")
+                 (("SharedTools::")
+                  "")))
+             #t))
+         (add-before 'check 'pre-check
+           (lambda _
+             ;; 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)))))
+    (native-inputs
+     `(("cmocka" ,cmocka)
+       ("dot" ,graphviz)
+       ("doxygen" ,doxygen)
+       ("extra-cmake-modules" ,extra-cmake-modules)
+       ("glib:bin" ,glib "bin")
+       ("perl" ,perl)
+       ("pkg-config" ,pkg-config)
+       ("python" ,python-wrapper)
+       ("qtsolutions"
+        ,(origin
+           (method git-fetch)
+           (uri
+            (git-reference
+             (url "https://github.com/qtproject/qt-solutions")
+             (commit "9568abd142d581b67b86a5f63d823a34b0612702")))
+           (file-name
+            (git-file-name "qtsolutions" "9568abd"))
+           (sha256
+            (base32 "17fnmassflm3vxi0krpr6fff368jy38cby31a48rban4nqqmgx7n"))))
+       ("qttools" ,qttools)
+       ("ruby" ,ruby)))
+    (inputs
+     `(("appstream" ,appstream)
+       ("glib" ,glib)
+       ("kconfig" ,kconfig)
+       ("kcoreaddons" ,kcoreaddons)
+       ("kio" ,kio)
+       ("kjs" ,kjs)
+       ("libcloudproviders" ,libcloudproviders)
+       ("libzip" ,libzip)
+       ("openssl" ,openssl)
+       ("python-nautilus" ,python-nautilus)
+       ("qtbase" ,qtbase)
+       ("qtdeclarative" ,qtdeclarative)
+       ("qtgraphicaleffects" ,qtgraphicaleffects)
+       ("qtkeychain" ,qtkeychain)
+       ("qtquickcontrols2" ,qtquickcontrols2)
+       ("qtsvg" ,qtsvg)
+       ("qtwebchannel" ,qtwebchannel)
+       ("qtwebsockets" ,qtwebsockets)
+       ("qtwebkit" ,qtwebkit)
+       ("sqlite" ,sqlite)
+       ("zlib" ,zlib)))
+    (propagated-inputs
+     `(("qtwebengine" ,qtwebengine)))
+    (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/install/#install-clients")
+    (license
+     (list
+      ;; QtProgressIndicator
+      license:expat
+      ;; All ThirdParty (except QtProgressIndicator)
+      license:lgpl2.1+
+      ;; Others
+      license:gpl2+))))
-- 
2.30.1


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [bug#45889] Nextcloud Client (v14)
  2021-02-22 17:29                             ` [bug#45889] Nextcloud Client (v13) Raghav Gururajan via Guix-patches via
@ 2021-02-23 14:27                               ` Raghav Gururajan via Guix-patches via
  2021-02-23 17:58                                 ` Leo Prikler
  0 siblings, 1 reply; 44+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-02-23 14:27 UTC (permalink / raw)
  To: Leo Prikler, 45889


[-- Attachment #1.1.1: Type: text/plain, Size: 0 bytes --]



[-- Attachment #1.1.2: 0001-gnu-Add-appstream.patch --]
[-- Type: text/x-patch, Size: 5614 bytes --]

From d4b271d3fcff56c27e6ee0222e688aad4b78a8eb Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <rg@raghavgururajan.name>
Date: Thu, 14 Jan 2021 23:32:27 -0500
Subject: [PATCH 1/2] gnu: Add appstream.

* gnu/packages/freedesktop.scm (appstream): New variable.
---
 gnu/packages/freedesktop.scm | 96 ++++++++++++++++++++++++++++++++++++
 1 file changed, 96 insertions(+)

diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index e00454f7b3..bccd8e9b00 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -58,8 +58,10 @@
   #:use-module (gnu packages bash)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
+  #:use-module (gnu packages cmake)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages cryptsetup)
+  #:use-module (gnu packages databases)
   #:use-module (gnu packages disk)
   #:use-module (gnu packages docbook)
   #:use-module (gnu packages documentation)
@@ -75,6 +77,7 @@
   #:use-module (gnu packages gstreamer)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages image)
+  #:use-module (gnu packages language)
   #:use-module (gnu packages libffi)
   #:use-module (gnu packages libunwind)
   #:use-module (gnu packages libusb)
@@ -101,6 +104,99 @@
   #:use-module (gnu packages xorg)
   #:use-module (srfi srfi-1))
 
+(define-public appstream
+  (package
+    (name "appstream")
+    (version "0.13.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append "https://www.freedesktop.org/software/"
+                       "appstream/releases/"
+                       "AppStream-" version ".tar.xz"))
+       (sha256
+        (base32 "09l6ixz1w29pi0nb0flz14m4r3f2hpqpp1fq8y66v9xa4c9fczds"))))
+    (build-system meson-build-system)
+    (arguments
+     `(#:glib-or-gtk? #t
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-libstemmer
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "meson.build"
+               (("/usr/include")
+                (string-append (assoc-ref inputs "libstemmer")
+                               "/include")))
+             #t))
+         (add-after 'patch-libstemmer 'patch-docbook-xml
+           (lambda* (#:key inputs #:allow-other-keys)
+             (with-directory-excursion "docs/api"
+               (substitute* "appstream-docs.xml"
+                 (("http://www.oasis-open.org/docbook/xml/4.3/")
+                  (string-append (assoc-ref inputs "docbook-xml-4.3")
+                                 "/xml/dtd/docbook/"))))
+             (for-each (lambda (file)
+                         (substitute* file
+                           (("http://www.oasis-open.org/docbook/xml/4.5/")
+                            (string-append (assoc-ref inputs "docbook-xml")
+                                           "/xml/dtd/docbook/"))))
+                       (find-files "scripts/desc" "\\.xml$"))
+             #t))
+         (add-after 'patch-docbook-xml 'disable-failing-tests
+           (lambda _
+             (substitute* "tests/test-pool.c"
+               (("	g_test_add_func \\(\"/AppStream/PoolRead\", test_pool_read\\);")
+                "")
+               (("	g_test_add_func \\(\"/AppStream/PoolReadAsync\", test_pool_read_async\\);")
+                "")
+               (("	g_test_add_func \\(\"/AppStream/PoolEmpty\", test_pool_empty\\);")
+                "")
+               (("	g_test_add_func \\(\"/AppStream/Cache\", test_cache\\);")
+                "")
+               (("	g_test_add_func \\(\"/AppStream/Merges\", test_merge_components\\);")
+                ""))
+             #t))
+         (add-after 'disable-failing-tests 'patch-install-dir
+           (lambda* (#:key outputs #:allow-other-keys)
+             (substitute* "data/meson.build"
+               (("/etc")
+                (string-append (assoc-ref outputs "out")
+                               "/etc")))
+             #t)))))
+    (native-inputs
+     `(("cmake" ,cmake)
+       ("docbook-xml-4.3" ,docbook-xml-4.3)
+       ("docbook-xml" ,docbook-xml)
+       ("docbook-xsl" ,docbook-xsl)
+       ("gettext" ,gettext-minimal)
+       ("glib:bin" ,glib "bin")
+       ("gobject-introspection" ,gobject-introspection)
+       ("gperf" ,gperf)
+       ("gtk-doc" ,gtk-doc)
+       ("pkg-config" ,pkg-config)
+       ("python" ,python-wrapper)
+       ("xsltproc" ,libxslt)))
+    (inputs
+     `(("libsoup" ,libsoup)
+       ("libstemmer" ,libstemmer)
+       ("libxml2" ,libxml2)
+       ("libyaml" ,libyaml)
+       ("lmdb" ,lmdb)))
+    (propagated-inputs
+     `(("glib" ,glib)))
+    (synopsis "Tools and libraries to work with AppStream metadata")
+    (description "AppStream is a cross-distribution effort for enhancing the way
+we interact with the software repositories provided by distributions by
+standardizing software component metadata.  It provides the foundation to build
+software-center applications, by providing metadata necessary for an
+application-centric view on package repositories.  It additionally provides
+specifications for things like an unified software metadata database, screenshot
+services and various other things needed to create user-friendly
+application-centers for distributions.")
+    (home-page "https://www.freedesktop.org/wiki/Distributions/AppStream/")
+    (license license:gpl2+)))
+
 (define-public farstream
   (package
     (name "farstream")
-- 
2.30.1


[-- Attachment #1.1.3: 0002-gnu-Add-nextcloud-client.patch --]
[-- Type: text/x-patch, Size: 7479 bytes --]

From b3df8c3b3f5d3e3cc286b95df1928c81edba3556 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <rg@raghavgururajan.name>
Date: Tue, 23 Feb 2021 08:24:47 -0500
Subject: [PATCH 2/2] gnu: Add nextcloud-client.

* gnu/packages/sync.scm (nextcloud-client): New variable.
---
 gnu/packages/sync.scm | 148 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 148 insertions(+)

diff --git a/gnu/packages/sync.scm b/gnu/packages/sync.scm
index f3d6e9013c..a3a1dda240 100644
--- a/gnu/packages/sync.scm
+++ b/gnu/packages/sync.scm
@@ -28,6 +28,7 @@
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system go)
   #:use-module (guix build-system meson)
+  #:use-module (guix build-system qt)
   #:use-module (guix download)
   #:use-module (guix git-download)
   #:use-module (guix packages)
@@ -40,8 +41,11 @@
   #:use-module (gnu packages crypto)
   #:use-module (gnu packages curl)
   #:use-module (gnu packages documentation)
+  #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages glib)
+  #:use-module (gnu packages gnome)
   #:use-module (gnu packages golang)
+  #:use-module (gnu packages graphviz)
   #:use-module (gnu packages image)
   #:use-module (gnu packages kde-frameworks)
   #:use-module (gnu packages linux)
@@ -49,14 +53,158 @@
   #:use-module (gnu packages pcre)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages python)
+  #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages qt)
   #:use-module (gnu packages readline)
   #:use-module (gnu packages rsync)
+  #:use-module (gnu packages ruby)
   #:use-module (gnu packages selinux)
   #:use-module (gnu packages sphinx)
   #:use-module (gnu packages sqlite)
   #:use-module (gnu packages tls))
 
+(define-public nextcloud-client
+  (package
+    (name "nextcloud-client")
+    (version "3.1.3")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://github.com/nextcloud/desktop")
+         (commit
+          (string-append "v" version))))
+       (file-name
+        (git-file-name name version))
+       (sha256
+        (base32 "15ymk3gvfmgwzmqbhlw7jjy9y65ib3391h1dlmpll65iaj2miajk"))
+       (modules '((guix build utils)
+                  (ice-9 ftw)
+                  (srfi srfi-1)))
+       (snippet
+        `(begin
+           (let ((keep '( ;; Not available in Guix.
+                         "QProgressIndicator"
+                         "kmessagewidget" "qtokenizer")))
+             (with-directory-excursion "src/3rdparty"
+               (for-each delete-file-recursively
+                         (lset-difference string=?
+                                          (scandir ".")
+                                          (cons* "." ".." keep))))
+             #t)))))
+    (build-system qt-build-system)
+    (arguments
+     `(#:configure-flags
+       (list
+        "-DUNIT_TESTING=ON"
+        ;; Upstream Bug: https://github.com/nextcloud/desktop/issues/2885
+        "-DNO_SHIBBOLETH=ON")
+       #: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))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-source
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((qtsolutions (assoc-ref inputs "qtsolutions")))
+               (for-each
+                (lambda (dir)
+                  (copy-recursively
+                   (string-append qtsolutions "/" dir "/src")
+                   (string-append "src/3rdparty/" dir)))
+                '("qtlockedfile" "qtsingleapplication")))
+             (with-directory-excursion "src/gui"
+               (substitute* `("application.h" "application.cpp")
+                 (("SharedTools::QtSingleApplication") "QtSingleApplication")
+                 (("slotParseMessage\\(const QString &(msg)?.*\\)")
+                  "slotParseMessage(const QString &msg)")))
+             #t))
+         (add-after 'patch-source 'patch-cmake
+           (lambda* (#:key outputs #:allow-other-keys)
+             ;; Patch install directory for dbus service files.
+             (substitute* "shell_integration/libcloudproviders/CMakeLists.txt"
+               (("PKGCONFIG_GETVAR\\(.+ _install_dir\\)")
+                "set(_install_dir \"${CMAKE_INSTALL_PREFIX}/share/dbus-1/services\")"))
+             ;; Make sure, that Qt modules are installed under $prefix.
+             (substitute* "shell_integration/dolphin/CMakeLists.txt"
+               (("ON CACHE")
+                "OFF CACHE"))
+             #t))
+         (add-before 'check 'pre-check
+           (lambda _
+             ;; 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)))))
+    (native-inputs
+     `(("cmocka" ,cmocka)
+       ("dot" ,graphviz)
+       ("doxygen" ,doxygen)
+       ("extra-cmake-modules" ,extra-cmake-modules)
+       ("glib:bin" ,glib "bin")
+       ("perl" ,perl)
+       ("pkg-config" ,pkg-config)
+       ("python" ,python-wrapper)
+       ("qtsolutions"
+        ,(origin
+           (method git-fetch)
+           (uri
+            (git-reference
+             (url "https://github.com/qtproject/qt-solutions")
+             (commit "9568abd142d581b67b86a5f63d823a34b0612702")))
+           (file-name
+            (git-file-name "qtsolutions" "9568abd"))
+           (sha256
+            (base32 "17fnmassflm3vxi0krpr6fff368jy38cby31a48rban4nqqmgx7n"))))
+       ("qttools" ,qttools)
+       ("ruby" ,ruby)))
+    (inputs
+     `(("appstream" ,appstream)
+       ("glib" ,glib)
+       ("kconfig" ,kconfig)
+       ("kcoreaddons" ,kcoreaddons)
+       ("kio" ,kio)
+       ("kjs" ,kjs)
+       ("libcloudproviders" ,libcloudproviders)
+       ("libzip" ,libzip)
+       ("openssl" ,openssl)
+       ("python-nautilus" ,python-nautilus)
+       ("qtbase" ,qtbase)
+       ("qtdeclarative" ,qtdeclarative)
+       ("qtgraphicaleffects" ,qtgraphicaleffects)
+       ("qtkeychain" ,qtkeychain)
+       ("qtquickcontrols2" ,qtquickcontrols2)
+       ("qtsvg" ,qtsvg)
+       ("qtwebchannel" ,qtwebchannel)
+       ("qtwebsockets" ,qtwebsockets)
+       ("qtwebkit" ,qtwebkit)
+       ("sqlite" ,sqlite)
+       ("zlib" ,zlib)))
+    (propagated-inputs
+     `(("qtwebengine" ,qtwebengine)))
+    (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/install/#install-clients")
+    (license
+     (list
+      ;; QtProgressIndicator
+      license:expat
+      ;; All ThirdParty (except QtProgressIndicator)
+      license:lgpl2.1+
+      ;; Others
+      license:gpl2+))))
+
 (define-public megacmd
   (package
     (name "megacmd")
-- 
2.30.1


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [bug#45889] Nextcloud Client (v14)
  2021-02-23 14:27                               ` [bug#45889] Nextcloud Client (v14) Raghav Gururajan via Guix-patches via
@ 2021-02-23 17:58                                 ` Leo Prikler
  2021-03-09  6:00                                   ` [bug#45889] Nextcloud Client (v15) Raghav Gururajan via Guix-patches via
  0 siblings, 1 reply; 44+ messages in thread
From: Leo Prikler @ 2021-02-23 17:58 UTC (permalink / raw)
  To: Raghav Gururajan, 45889

Hi Raghav,

Am Dienstag, den 23.02.2021, 09:27 -0500 schrieb Raghav Gururajan:
> +             (let* ((qtsolutions (assoc-ref inputs "qtsolutions")))
> +               (for-each
> +                (lambda (dir)
> +                  (copy-recursively
> +                   (string-append qtsolutions "/" dir "/src")
> +                   (string-append "src/3rdparty/" dir)))
> +                '("qtlockedfile" "qtsingleapplication")))
> +             (with-directory-excursion "src/gui"
> +               (substitute* `("application.h" "application.cpp")
> +                 (("SharedTools::QtSingleApplication")
> "QtSingleApplication")
> +                 (("slotParseMessage\\(const QString &(msg)?.*\\)")
> +                  "slotParseMessage(const QString &msg)")))
Being the one who helped review this, I of course know, what it does,
but others might not, so this probably deserves a (short) comment.

> +       ("qtsolutions"
> +        ,(origin
> +           (method git-fetch)
> +           (uri
> +            (git-reference
> +             (url "https://github.com/qtproject/qt-solutions")
> +             (commit "9568abd142d581b67b86a5f63d823a34b0612702")))
> +           (file-name
> +            (git-file-name "qtsolutions" "9568abd"))
> +           (sha256
> +            (base32
> "17fnmassflm3vxi0krpr6fff368jy38cby31a48rban4nqqmgx7n"))))
I'm still not convinced, that this can't be made a package or perhaps
multiple packages, one per "solution".  Each of the folder seems to
contain a project file, which to be fair do have some non-Unix-related
install declarations, but it should at least install a statically
linked package *somewhere*.  We can go from there.

Alternatively, as I see this as a source, that will get copied around
in the same way I copied libgd from gedit, you can at least extract the
origin into a function in qt.scm, potentially named qt-solutions.

Regards,
Leo





^ permalink raw reply	[flat|nested] 44+ messages in thread

* [bug#45889] Nextcloud Client (v15)
  2021-02-23 17:58                                 ` Leo Prikler
@ 2021-03-09  6:00                                   ` Raghav Gururajan via Guix-patches via
  2021-03-09  7:03                                     ` Leo Prikler
  0 siblings, 1 reply; 44+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-03-09  6:00 UTC (permalink / raw)
  To: Leo Prikler, 45889


[-- Attachment #1.1.1: Type: text/plain, Size: 876 bytes --]

Hi Leo!

> I'm still not convinced, that this can't be made a package or perhaps
> multiple packages, one per "solution".  Each of the folder seems to
> contain a project file, which to be fair do have some non-Unix-related
> install declarations, but it should at least install a statically
> linked package *somewhere*.  We can go from there.
> 
> Alternatively, as I see this as a source, that will get copied around
> in the same way I copied libgd from gedit, you can at least extract the
> origin into a function in qt.scm, potentially named qt-solutions.


In attached v15, I have:

[1] Packaged QtSolutions.
[2] Removed QtLockedFile, QtSingleApplication, and KMessageWidget from 
3rdparty.
[3] Patched the source to use KMessageWidget from KWidgetsAddons, and, 
to use QtLockedFile and QtSingleApplication from QtSolutions.

\o/

Regards,
RG.

[-- Attachment #1.1.2: 0001-gnu-Add-appstream.patch --]
[-- Type: text/x-patch, Size: 5614 bytes --]

From 2630078c89b3aedd305f20754502dc32467a947c Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <rg@raghavgururajan.name>
Date: Thu, 14 Jan 2021 23:32:27 -0500
Subject: [PATCH 1/3] gnu: Add appstream.

* gnu/packages/freedesktop.scm (appstream): New variable.
---
 gnu/packages/freedesktop.scm | 96 ++++++++++++++++++++++++++++++++++++
 1 file changed, 96 insertions(+)

diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index e00454f7b3..bccd8e9b00 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -58,8 +58,10 @@
   #:use-module (gnu packages bash)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
+  #:use-module (gnu packages cmake)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages cryptsetup)
+  #:use-module (gnu packages databases)
   #:use-module (gnu packages disk)
   #:use-module (gnu packages docbook)
   #:use-module (gnu packages documentation)
@@ -75,6 +77,7 @@
   #:use-module (gnu packages gstreamer)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages image)
+  #:use-module (gnu packages language)
   #:use-module (gnu packages libffi)
   #:use-module (gnu packages libunwind)
   #:use-module (gnu packages libusb)
@@ -101,6 +104,99 @@
   #:use-module (gnu packages xorg)
   #:use-module (srfi srfi-1))
 
+(define-public appstream
+  (package
+    (name "appstream")
+    (version "0.13.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append "https://www.freedesktop.org/software/"
+                       "appstream/releases/"
+                       "AppStream-" version ".tar.xz"))
+       (sha256
+        (base32 "09l6ixz1w29pi0nb0flz14m4r3f2hpqpp1fq8y66v9xa4c9fczds"))))
+    (build-system meson-build-system)
+    (arguments
+     `(#:glib-or-gtk? #t
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-libstemmer
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "meson.build"
+               (("/usr/include")
+                (string-append (assoc-ref inputs "libstemmer")
+                               "/include")))
+             #t))
+         (add-after 'patch-libstemmer 'patch-docbook-xml
+           (lambda* (#:key inputs #:allow-other-keys)
+             (with-directory-excursion "docs/api"
+               (substitute* "appstream-docs.xml"
+                 (("http://www.oasis-open.org/docbook/xml/4.3/")
+                  (string-append (assoc-ref inputs "docbook-xml-4.3")
+                                 "/xml/dtd/docbook/"))))
+             (for-each (lambda (file)
+                         (substitute* file
+                           (("http://www.oasis-open.org/docbook/xml/4.5/")
+                            (string-append (assoc-ref inputs "docbook-xml")
+                                           "/xml/dtd/docbook/"))))
+                       (find-files "scripts/desc" "\\.xml$"))
+             #t))
+         (add-after 'patch-docbook-xml 'disable-failing-tests
+           (lambda _
+             (substitute* "tests/test-pool.c"
+               (("	g_test_add_func \\(\"/AppStream/PoolRead\", test_pool_read\\);")
+                "")
+               (("	g_test_add_func \\(\"/AppStream/PoolReadAsync\", test_pool_read_async\\);")
+                "")
+               (("	g_test_add_func \\(\"/AppStream/PoolEmpty\", test_pool_empty\\);")
+                "")
+               (("	g_test_add_func \\(\"/AppStream/Cache\", test_cache\\);")
+                "")
+               (("	g_test_add_func \\(\"/AppStream/Merges\", test_merge_components\\);")
+                ""))
+             #t))
+         (add-after 'disable-failing-tests 'patch-install-dir
+           (lambda* (#:key outputs #:allow-other-keys)
+             (substitute* "data/meson.build"
+               (("/etc")
+                (string-append (assoc-ref outputs "out")
+                               "/etc")))
+             #t)))))
+    (native-inputs
+     `(("cmake" ,cmake)
+       ("docbook-xml-4.3" ,docbook-xml-4.3)
+       ("docbook-xml" ,docbook-xml)
+       ("docbook-xsl" ,docbook-xsl)
+       ("gettext" ,gettext-minimal)
+       ("glib:bin" ,glib "bin")
+       ("gobject-introspection" ,gobject-introspection)
+       ("gperf" ,gperf)
+       ("gtk-doc" ,gtk-doc)
+       ("pkg-config" ,pkg-config)
+       ("python" ,python-wrapper)
+       ("xsltproc" ,libxslt)))
+    (inputs
+     `(("libsoup" ,libsoup)
+       ("libstemmer" ,libstemmer)
+       ("libxml2" ,libxml2)
+       ("libyaml" ,libyaml)
+       ("lmdb" ,lmdb)))
+    (propagated-inputs
+     `(("glib" ,glib)))
+    (synopsis "Tools and libraries to work with AppStream metadata")
+    (description "AppStream is a cross-distribution effort for enhancing the way
+we interact with the software repositories provided by distributions by
+standardizing software component metadata.  It provides the foundation to build
+software-center applications, by providing metadata necessary for an
+application-centric view on package repositories.  It additionally provides
+specifications for things like an unified software metadata database, screenshot
+services and various other things needed to create user-friendly
+application-centers for distributions.")
+    (home-page "https://www.freedesktop.org/wiki/Distributions/AppStream/")
+    (license license:gpl2+)))
+
 (define-public farstream
   (package
     (name "farstream")
-- 
2.30.1


[-- Attachment #1.1.3: 0002-gnu-Add-qtsolutions.patch --]
[-- Type: text/x-patch, Size: 5343 bytes --]

From 0b33f8d10fc3de8652932b46a485b78e7aa305c3 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <rg@raghavgururajan.name>
Date: Sun, 7 Mar 2021 10:44:55 -0500
Subject: [PATCH 2/3] gnu: Add qtsolutions.

* gnu/packages/qt.scm (qtsolutions): New variable.
---
 gnu/packages/qt.scm | 110 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 110 insertions(+)

diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index c49251053d..66483f1c48 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -105,6 +105,116 @@
   #:use-module (gnu packages xml)
   #:use-module (srfi srfi-1))
 
+(define-public qtsolutions
+  (let ((commit "9568abd142d581b67b86a5f63d823a34b0612702")
+        (revision "53"))
+    (package
+      (name "qtsolutions")
+      (version
+       (git-version "0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri
+          (git-reference
+           (url "https://code.qt.io/qt-solutions/qt-solutions")
+           (commit commit)))
+         (file-name
+          (git-file-name name version))
+         (sha256
+          (base32 "17fnmassflm3vxi0krpr6fff368jy38cby31a48rban4nqqmgx7n"))))
+      (build-system gnu-build-system)
+      (arguments
+       `(#:tests? #f                    ; No target
+         #:imported-modules
+         ((guix build copy-build-system)
+          ,@%gnu-build-system-modules)
+         #:modules
+         (((guix build copy-build-system)
+           #:prefix copy:)
+          (guix build gnu-build-system)
+          (guix build utils))
+         #:phases
+         (modify-phases %standard-phases
+           (add-after 'unpack 'patch-source
+             (lambda* (#:key outputs #:allow-other-keys)
+               (substitute* (find-files "." "common.pri")
+                 ;; Remove prefix in library names.
+                 (("qt5")
+                  "qt")
+                 ;; Remove suffix in library names.
+                 (("-head")
+                  "")
+                 ;; Generate libraries directly in output.
+                 (("\\$\\$PWD")
+                  (assoc-ref outputs "out")))
+               ;; Disable building of examples.
+               (substitute* (find-files "." "\\.pro$")
+                 (("SUBDIRS\\+=examples")
+                  ""))
+               ;; Fix deprecated functions.
+               (substitute* "qtsoap/src/qtsoap.cpp"
+                 (("toAscii")
+                  "toLatin1"))
+               #t))
+           (replace 'configure
+             (lambda _
+               (for-each (lambda (solution)
+                           (with-directory-excursion solution
+                             (invoke "./configure" "-library")
+                             (invoke "qmake")))
+                         (list
+                          "qtlockedfile"
+                          "qtpropertybrowser"
+                          "qtservice"
+                          "qtsingleapplication"
+                          "qtsoap"))
+               #t))
+           (replace 'build
+             (lambda _
+               (for-each (lambda (solution)
+                           (with-directory-excursion solution
+                             (invoke "make")))
+                         (list
+                          "qtlockedfile"
+                          "qtpropertybrowser"
+                          "qtservice"
+                          "qtsingleapplication"
+                          "qtsoap"))
+               #t))
+           (replace 'install
+             (lambda args
+               (apply (assoc-ref copy:%standard-phases 'install)
+                      #:install-plan
+                      '(("qtlockedfile/src" "include/qtlockedfile"
+                         #:include-regexp ("\\.h$"))
+                        ("qtpropertybrowser/src" "include/qtpropertybrowser"
+                         #:include-regexp ("\\.h$"))
+                        ("qtservice/src" "include/qtservice"
+                         #:include-regexp ("\\.h$"))
+                        ("qtsingleapplication/src" "include/qtsingleapplication"
+                         #:include-regexp ("\\.h$"))
+                        ("qtsoap/src" "include/qtsoap"
+                         #:include-regexp ("\\.h$")))
+                      args))))))
+      (inputs
+       `(("qtbase" ,qtbase)))
+      (synopsis "Qt Solutions")
+      (description "QtSolutions are set of components that extends Qt.
+@itemize
+@item QtLockedFile: A class that extends QFile with advisory locking functions.
+@item QtPropertyBrowser: A framework that enables the user to edit a set of
+properties.
+@item QtService: A component useful for developing Windows services and Unix
+daemons.
+@item QtSingleApplication: A component that provides support for applications
+that can be only started once per user.
+@item QtSoap: A component that provides basic web service support with version
+1.1 of the SOAP protocol.
+@end itemize\n")
+      (home-page "https://doc.qt.io/archives/qq/qq09-qt-solutions.html")
+      (license license:lgpl2.1+))))
+
 (define-public qite
   (let ((commit "75fb3b6bbd5c6a5a8fc35e08a6efbfb588ed546a")
         (revision "74"))
-- 
2.30.1


[-- Attachment #1.1.4: 0003-gnu-Add-nextcloud-client.patch --]
[-- Type: text/x-patch, Size: 8206 bytes --]

From 7bc3348585c325208fab89232f720d81fbaa5d0a Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <rg@raghavgururajan.name>
Date: Tue, 23 Feb 2021 08:24:47 -0500
Subject: [PATCH 3/3] gnu: Add nextcloud-client.

* gnu/packages/sync.scm (nextcloud-client): New variable.
---
 gnu/packages/sync.scm | 159 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 159 insertions(+)

diff --git a/gnu/packages/sync.scm b/gnu/packages/sync.scm
index 76b822ecbc..964746b1b2 100644
--- a/gnu/packages/sync.scm
+++ b/gnu/packages/sync.scm
@@ -28,6 +28,7 @@
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system go)
   #:use-module (guix build-system meson)
+  #:use-module (guix build-system qt)
   #:use-module (guix download)
   #:use-module (guix git-download)
   #:use-module (guix packages)
@@ -40,8 +41,11 @@
   #:use-module (gnu packages crypto)
   #:use-module (gnu packages curl)
   #:use-module (gnu packages documentation)
+  #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages glib)
+  #:use-module (gnu packages gnome)
   #:use-module (gnu packages golang)
+  #:use-module (gnu packages graphviz)
   #:use-module (gnu packages image)
   #:use-module (gnu packages kde-frameworks)
   #:use-module (gnu packages linux)
@@ -49,14 +53,169 @@
   #:use-module (gnu packages pcre)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages python)
+  #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages qt)
   #:use-module (gnu packages readline)
   #:use-module (gnu packages rsync)
+  #:use-module (gnu packages ruby)
   #:use-module (gnu packages selinux)
   #:use-module (gnu packages sphinx)
   #:use-module (gnu packages sqlite)
   #:use-module (gnu packages tls))
 
+(define-public nextcloud-client
+  (package
+    (name "nextcloud-client")
+    (version "3.1.3")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://github.com/nextcloud/desktop")
+         (commit
+          (string-append "v" version))))
+       (file-name
+        (git-file-name name version))
+       (sha256
+        (base32 "15ymk3gvfmgwzmqbhlw7jjy9y65ib3391h1dlmpll65iaj2miajk"))
+       (modules '((guix build utils)
+                  (ice-9 ftw)
+                  (srfi srfi-1)))
+       (snippet
+        `(begin
+           (let* ((keep
+                   ;; Not available in Guix.
+                   (list
+                    "QProgressIndicator"
+                    "qtokenizer")))
+             (with-directory-excursion "src/3rdparty"
+               (for-each delete-file-recursively
+                         (lset-difference string=?
+                                          (scandir ".")
+                                          (cons* "." ".." keep))))
+             #t)))))
+    (build-system qt-build-system)
+    (arguments
+     `(#:configure-flags
+       (list
+        "-DUNIT_TESTING=ON"
+        ;; Upstream Bug: https://github.com/nextcloud/desktop/issues/2885
+        "-DNO_SHIBBOLETH=ON")
+       #: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))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-source
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (with-directory-excursion "src/gui"
+               (substitute* "CMakeLists.txt"
+                 (("    \\.\\./3rdparty/qtlockedfile/?.*")
+                  "")
+                 (("    \\.\\./3rdparty/qtsingleapplication/?.*")
+                  "")
+                 (("    \\.\\./3rdparty/kmessagewidget/?.*")
+                  "")
+                 (("   list\\(APPEND 3rdparty_SRC \\.\\./3rdparty/?.*\\)")
+                  "")
+                 (("\\$\\{CMAKE_SOURCE_DIR\\}/src/3rdparty/qtlockedfile")
+                  (string-append (assoc-ref inputs "qtsolutions")
+                                 "/include/qtlockedfile/"))
+                 (("\\$\\{CMAKE_SOURCE_DIR\\}/src/3rdparty/qtsingleapplication")
+                  (string-append (assoc-ref inputs "qtsolutions")
+                                 "/include/qtsingleapplication/"))
+                 (("\\$\\{CMAKE_SOURCE_DIR\\}/src/3rdparty/kmessagewidget")
+                  (string-append (assoc-ref inputs "kwidgetsaddons")
+                                 "/include/KF5/KWidgetsAddons/"))
+                 (("\\$\\{synclib_NAME\\}")
+                  (string-append "${synclib_NAME} "
+                                 "QtSolutions_LockedFile "
+                                 "QtSolutions_SingleApplication "
+                                 "KF5WidgetsAddons")))
+               (substitute* '("application.h" "application.cpp")
+                 (("SharedTools::QtSingleApplication")
+                  "QtSingleApplication")
+                 (("slotParseMessage\\(const QString &(msg)?.*\\)")
+                  "slotParseMessage(const QString &msg)")))
+             #t))
+         (add-after 'patch-source 'patch-cmake
+           (lambda* (#:key outputs #:allow-other-keys)
+             ;; Patch install directory for dbus service files.
+             (substitute* "shell_integration/libcloudproviders/CMakeLists.txt"
+               (("PKGCONFIG_GETVAR\\(.+ _install_dir\\)")
+                (string-append "set(_install_dir \"${CMAKE_INSTALL_PREFIX}"
+                               "/share/dbus-1/services\")")))
+             ;; Make sure, that Qt modules are installed under $prefix.
+             (substitute* "shell_integration/dolphin/CMakeLists.txt"
+               (("ON CACHE")
+                "OFF CACHE"))
+             #t))
+         (add-before 'check 'pre-check
+           (lambda _
+             ;; 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)))))
+    (native-inputs
+     `(("cmocka" ,cmocka)
+       ("dot" ,graphviz)
+       ("doxygen" ,doxygen)
+       ("extra-cmake-modules" ,extra-cmake-modules)
+       ("glib:bin" ,glib "bin")
+       ("perl" ,perl)
+       ("pkg-config" ,pkg-config)
+       ("python" ,python-wrapper)
+       ("qttools" ,qttools)
+       ("ruby" ,ruby)))
+    (inputs
+     `(("appstream" ,appstream)
+       ("glib" ,glib)
+       ("kconfig" ,kconfig)
+       ("kcoreaddons" ,kcoreaddons)
+       ("kio" ,kio)
+       ("kjs" ,kjs)
+       ("kwidgetsaddons" ,kwidgetsaddons)
+       ("libcloudproviders" ,libcloudproviders)
+       ("libzip" ,libzip)
+       ("openssl" ,openssl)
+       ("python-nautilus" ,python-nautilus)
+       ("qtbase" ,qtbase)
+       ("qtdeclarative" ,qtdeclarative)
+       ("qtgraphicaleffects" ,qtgraphicaleffects)
+       ("qtkeychain" ,qtkeychain)
+       ("qtquickcontrols2" ,qtquickcontrols2)
+       ("qtsolutions" ,qtsolutions)
+       ("qtsvg" ,qtsvg)
+       ("qtwebchannel" ,qtwebchannel)
+       ("qtwebsockets" ,qtwebsockets)
+       ("qtwebkit" ,qtwebkit)
+       ("sqlite" ,sqlite)
+       ("zlib" ,zlib)))
+    (propagated-inputs
+     `(("qtwebengine" ,qtwebengine)))
+    (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/install/#install-clients")
+    (license
+     (list
+      ;; QtProgressIndicator
+      license:expat
+      ;; All ThirdParty (except QtProgressIndicator)
+      license:lgpl2.1+
+      ;; Others
+      license:gpl2+))))
+
 (define-public megacmd
   (package
     (name "megacmd")
-- 
2.30.1


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [bug#45889] Nextcloud Client (v15)
  2021-03-09  6:00                                   ` [bug#45889] Nextcloud Client (v15) Raghav Gururajan via Guix-patches via
@ 2021-03-09  7:03                                     ` Leo Prikler
  2021-03-09 10:50                                       ` [bug#45889] Nextcloud Client (v16) Raghav Gururajan via Guix-patches via
  0 siblings, 1 reply; 44+ messages in thread
From: Leo Prikler @ 2021-03-09  7:03 UTC (permalink / raw)
  To: Raghav Gururajan, 45889

Hi Raghav,

> Subject: [PATCH 2/3] gnu: Add qtsolutions.
> +      (version
> +       (git-version "0" revision commit))

> +         (file-name
> +          (git-file-name name version))

> +                 (("qt5")
> +                  "qt")

> +                 (("-head")
> +                  "")

> +                 (("SUBDIRS\\+=examples")
> +                  ""))
Try not to arbitrarily use too many new lines.  If you break Scheme
code in such a manner for no good reason, it will look odd.

> +                 (("toAscii")
> +                  "toLatin1"))
Why not to UTF-8?  Is the input already UTF-8 and we want to convert it
to a single-byte character set?

> +                 (("\\$\\$PWD")
> +                  (assoc-ref outputs "out")))
You should install the shared libraries in the install phase.

> +                         (list
> +                          "qtlockedfile"
> +                          "qtpropertybrowser"
> +                          "qtservice"
> +                          "qtsingleapplication"
> +                          "qtsoap")
Use '(...) for fixed input.

> Subject: [PATCH 3/3] gnu: Add nextcloud-client.
> +         (commit
> +          (string-append "v" version)))

> +                 (("    \\.\\./3rdparty/qtlockedfile/?.*")
> +                  "")
> +                 (("    \\.\\./3rdparty/qtsingleapplication/?.*")
> +                  "")
> +                 (("    \\.\\./3rdparty/kmessagewidget/?.*")
> +                  "")
> +                 (("   list\\(APPEND 3rdparty_SRC
> \\.\\./3rdparty/?.*\\)")
> +                  "")
I'm starting to grow a little suspicious about matching the leading
spaces.  You probably want to lead this (and similar stuff in 0001)
with [ \t]*.

> +                 (("\\$\\{CMAKE_SOURCE_DIR\\}/src/3rdparty/qtlockedf
> ile")
> +                  (string-append (assoc-ref inputs "qtsolutions")
> +                                 "/include/qtlockedfile/"))
> +                 (("\\$\\{CMAKE_SOURCE_DIR\\}/src/3rdparty/qtsinglea
> pplication")
> +                  (string-append (assoc-ref inputs "qtsolutions")
> +                                 "/include/qtsingleapplication/"))
> +                 (("\\$\\{CMAKE_SOURCE_DIR\\}/src/3rdparty/kmessagew
> idget")
> +                  (string-append (assoc-ref inputs "kwidgetsaddons")
> +                                 "/include/KF5/KWidgetsAddons/"))
LGTM, but probably deserves a comment.
Also, you might skip the stuff leading up to /3rdparty, i.e. have
".*/3rdparty/qtlockedfile", etc.  Perhaps this gives you enough wiggle
room to do lockedfile and single application on the same line, but it
doesn't hurt if it doesn't.

> +                 (("\\$\\{synclib_NAME\\}")
> +                  (string-append "${synclib_NAME} "
> +                                 "QtSolutions_LockedFile "
> +                                 "QtSolutions_SingleApplication "
> +                                 "KF5WidgetsAddons")))
Definitely deserves a comment and perhaps a less broad match?

> +               (substitute* '("application.h" "application.cpp")
> +                 (("SharedTools::QtSingleApplication")
> +                  "QtSingleApplication")
> +                 (("slotParseMessage\\(const QString &(msg)?.*\\)")
> +                  "slotParseMessage(const QString &msg)")))
Also deserves a comment about QtSingleApplication differences.

> +                (string-append "set(_install_dir
> \"${CMAKE_INSTALL_PREFIX}"
> +                               "/share/dbus-1/services\")")))
Would the raw string here exceed a line?

> +      ;; All ThirdParty (except QtProgressIndicator)
> +      license:lgpl2.1+
This is now just qtokenizer, right?

Regards,
Leo





^ permalink raw reply	[flat|nested] 44+ messages in thread

* [bug#45889] Nextcloud Client (v16)
  2021-03-09  7:03                                     ` Leo Prikler
@ 2021-03-09 10:50                                       ` Raghav Gururajan via Guix-patches via
  2021-03-09 11:39                                         ` Leo Prikler
  0 siblings, 1 reply; 44+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-03-09 10:50 UTC (permalink / raw)
  To: Leo Prikler, 45889


[-- Attachment #1.1.1: Type: text/plain, Size: 1046 bytes --]

Hi Leo!

> Try not to arbitrarily use too many new lines.  If you break Scheme
> code in such a manner for no good reason, it will look odd.

Done.

> Why not to UTF-8?

Done.

> You should install the shared libraries in the install phase.

Done.

> Use '(...) for fixed input.

Done.

> I'm starting to grow a little suspicious about matching the leading
> spaces.  You probably want to lead this (and similar stuff in 0001)
> with [ \t]*.

Done.

> LGTM, but probably deserves a comment.

Done.

> Definitely deserves a comment and perhaps a less broad match?

Done the comment.

I think this is perfect match. The mentioned libraries will get linked 
wherever synclib gets linked. Also, this patch is compatible with 
current master, which is different from this version.

> Also deserves a comment about QtSingleApplication differences.

Done.

> Would the raw string here exceed a line?

Yep!

> This is now just qtokenizer, right?

Changed.

Please find the attached v16.

Regards,
RG.

[-- Attachment #1.1.2: 0001-gnu-Add-appstream.patch --]
[-- Type: text/x-patch, Size: 5539 bytes --]

From daad8ffd22e8f000a1569ca45b415e28b4e20798 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <rg@raghavgururajan.name>
Date: Thu, 14 Jan 2021 23:32:27 -0500
Subject: [PATCH 1/3] gnu: Add appstream.

* gnu/packages/freedesktop.scm (appstream): New variable.
---
 gnu/packages/freedesktop.scm | 96 ++++++++++++++++++++++++++++++++++++
 1 file changed, 96 insertions(+)

diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index e00454f7b3..60fa080c9d 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -58,8 +58,10 @@
   #:use-module (gnu packages bash)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
+  #:use-module (gnu packages cmake)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages cryptsetup)
+  #:use-module (gnu packages databases)
   #:use-module (gnu packages disk)
   #:use-module (gnu packages docbook)
   #:use-module (gnu packages documentation)
@@ -75,6 +77,7 @@
   #:use-module (gnu packages gstreamer)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages image)
+  #:use-module (gnu packages language)
   #:use-module (gnu packages libffi)
   #:use-module (gnu packages libunwind)
   #:use-module (gnu packages libusb)
@@ -101,6 +104,99 @@
   #:use-module (gnu packages xorg)
   #:use-module (srfi srfi-1))
 
+(define-public appstream
+  (package
+    (name "appstream")
+    (version "0.13.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append "https://www.freedesktop.org/software/"
+                       "appstream/releases/"
+                       "AppStream-" version ".tar.xz"))
+       (sha256
+        (base32 "09l6ixz1w29pi0nb0flz14m4r3f2hpqpp1fq8y66v9xa4c9fczds"))))
+    (build-system meson-build-system)
+    (arguments
+     `(#:glib-or-gtk? #t
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-libstemmer
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "meson.build"
+               (("/usr/include")
+                (string-append (assoc-ref inputs "libstemmer")
+                               "/include")))
+             #t))
+         (add-after 'patch-libstemmer 'patch-docbook-xml
+           (lambda* (#:key inputs #:allow-other-keys)
+             (with-directory-excursion "docs/api"
+               (substitute* "appstream-docs.xml"
+                 (("http://www.oasis-open.org/docbook/xml/4.3/")
+                  (string-append (assoc-ref inputs "docbook-xml-4.3")
+                                 "/xml/dtd/docbook/"))))
+             (for-each (lambda (file)
+                         (substitute* file
+                           (("http://www.oasis-open.org/docbook/xml/4.5/")
+                            (string-append (assoc-ref inputs "docbook-xml")
+                                           "/xml/dtd/docbook/"))))
+                       (find-files "scripts/desc" "\\.xml$"))
+             #t))
+         (add-after 'patch-docbook-xml 'disable-failing-tests
+           (lambda _
+             (substitute* "tests/test-pool.c"
+               (("[ \t]*g_test_add_func \\(\"/AppStream/PoolRead?.*;")
+                "")
+               (("[ \t]*g_test_add_func \\(\"/AppStream/PoolReadAsync?.*;")
+                "")
+               (("[ \t]*g_test_add_func \\(\"/AppStream/PoolEmpty?.*;")
+                "")
+               (("[ \t]*g_test_add_func \\(\"/AppStream/Cache?.*;")
+                "")
+               (("[ \t]*g_test_add_func \\(\"/AppStream/Merges?.*;")
+                ""))
+             #t))
+         (add-after 'disable-failing-tests 'patch-install-dir
+           (lambda* (#:key outputs #:allow-other-keys)
+             (substitute* "data/meson.build"
+               (("/etc")
+                (string-append (assoc-ref outputs "out")
+                               "/etc")))
+             #t)))))
+    (native-inputs
+     `(("cmake" ,cmake)
+       ("docbook-xml-4.3" ,docbook-xml-4.3)
+       ("docbook-xml" ,docbook-xml)
+       ("docbook-xsl" ,docbook-xsl)
+       ("gettext" ,gettext-minimal)
+       ("glib:bin" ,glib "bin")
+       ("gobject-introspection" ,gobject-introspection)
+       ("gperf" ,gperf)
+       ("gtk-doc" ,gtk-doc)
+       ("pkg-config" ,pkg-config)
+       ("python" ,python-wrapper)
+       ("xsltproc" ,libxslt)))
+    (inputs
+     `(("libsoup" ,libsoup)
+       ("libstemmer" ,libstemmer)
+       ("libxml2" ,libxml2)
+       ("libyaml" ,libyaml)
+       ("lmdb" ,lmdb)))
+    (propagated-inputs
+     `(("glib" ,glib)))
+    (synopsis "Tools and libraries to work with AppStream metadata")
+    (description "AppStream is a cross-distribution effort for enhancing the way
+we interact with the software repositories provided by distributions by
+standardizing software component metadata.  It provides the foundation to build
+software-center applications, by providing metadata necessary for an
+application-centric view on package repositories.  It additionally provides
+specifications for things like an unified software metadata database, screenshot
+services and various other things needed to create user-friendly
+application-centers for distributions.")
+    (home-page "https://www.freedesktop.org/wiki/Distributions/AppStream/")
+    (license license:gpl2+)))
+
 (define-public farstream
   (package
     (name "farstream")
-- 
2.30.1


[-- Attachment #1.1.3: 0002-gnu-Add-qtsolutions.patch --]
[-- Type: text/x-patch, Size: 4711 bytes --]

From f17fadd96e03b7507aa8c6aed1054ef976ed3e45 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <rg@raghavgururajan.name>
Date: Tue, 9 Mar 2021 02:14:56 -0500
Subject: [PATCH 2/3] gnu: Add qtsolutions.

* gnu/packages/qt.scm (qtsolutions): New variable.
---
 gnu/packages/qt.scm | 92 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 92 insertions(+)

diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 11e69ff5db..d5d4258f88 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -105,6 +105,98 @@
   #:use-module (gnu packages xml)
   #:use-module (srfi srfi-1))
 
+(define-public qtsolutions
+  (let ((commit "9568abd142d581b67b86a5f63d823a34b0612702")
+        (revision "53"))
+    (package
+      (name "qtsolutions")
+      (version
+       (git-version "0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri
+          (git-reference
+           (url "https://code.qt.io/cgit/qt-solutions/qt-solutions")
+           (commit commit)))
+         (file-name
+          (git-file-name name version))
+         (sha256
+          (base32 "17fnmassflm3vxi0krpr6fff368jy38cby31a48rban4nqqmgx7n"))))
+      (build-system gnu-build-system)
+      (arguments
+       `(#:tests? #f                    ; No target
+         #:imported-modules
+         ((guix build copy-build-system)
+          ,@%gnu-build-system-modules)
+         #:modules
+         (((guix build copy-build-system)
+           #:prefix copy:)
+          (guix build gnu-build-system)
+          (guix build utils))
+         #:phases
+         (modify-phases %standard-phases
+           (add-after 'unpack 'patch-source
+             (lambda* (#:key outputs #:allow-other-keys)
+               (substitute* (find-files "." "common.pri")
+                 ;; Remove prefix in library names.
+                 (("qt5") "qt")
+                 ;; Remove suffix in library names.
+                 (("-head") ""))
+               ;; Disable building of examples.
+               (substitute* (find-files "." "\\.pro$")
+                 (("SUBDIRS\\+=examples") ""))
+               ;; Fix deprecated functions.
+               (substitute* "qtsoap/src/qtsoap.cpp"
+                 (("toAscii") "toUtf8"))
+               #t))
+           (replace 'configure
+             (lambda _
+               (for-each (lambda (solution)
+                           (with-directory-excursion solution
+                             (invoke "./configure" "-library")
+                             (invoke "qmake")))
+                         '("qtlockedfile" "qtpropertybrowser" "qtservice"
+                           "qtsingleapplication" "qtsoap"))
+               #t))
+           (replace 'build
+             (lambda _
+               (for-each (lambda (solution)
+                           (with-directory-excursion solution
+                             (invoke "make")))
+                         '("qtlockedfile" "qtpropertybrowser" "qtservice"
+                           "qtsingleapplication" "qtsoap"))
+               #t))
+           (replace 'install
+             (lambda args
+               (for-each (lambda (solution)
+                           (with-directory-excursion solution
+                             (apply (assoc-ref copy:%standard-phases 'install)
+                                    #:install-plan
+                                    `(("src" ,(string-append "include/" solution)
+                                       #:include-regexp ("\\.h$"))
+                                      ("lib" "lib"))
+                                    args)))
+                         '("qtlockedfile" "qtpropertybrowser" "qtservice"
+                           "qtsingleapplication" "qtsoap")))))))
+      (inputs
+       `(("qtbase" ,qtbase)))
+      (synopsis "Qt Solutions")
+      (description "QtSolutions are set of components that extends Qt.
+@itemize
+@item QtLockedFile: A class that extends QFile with advisory locking functions.
+@item QtPropertyBrowser: A framework that enables the user to edit a set of
+properties.
+@item QtService: A component useful for developing Windows services and Unix
+daemons.
+@item QtSingleApplication: A component that provides support for applications
+that can be only started once per user.
+@item QtSoap: A component that provides basic web service support with version
+1.1 of the SOAP protocol.
+@end itemize\n")
+      (home-page "https://doc.qt.io/archives/qq/qq09-qt-solutions.html")
+      (license license:lgpl2.1+))))
+
 (define-public qt5ct
   (package
     (name "qt5ct")
-- 
2.30.1


[-- Attachment #1.1.4: 0003-gnu-Add-nextcloud-client.patch --]
[-- Type: text/x-patch, Size: 8477 bytes --]

From e52d1d8e4a602254c68be6739a18dedaf02d9ff2 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <rg@raghavgururajan.name>
Date: Tue, 9 Mar 2021 02:19:00 -0500
Subject: [PATCH 3/3] gnu: Add nextcloud-client.

* gnu/packages/messaging.scm (nextcloud-client): New variable.
---
 gnu/packages/sync.scm | 160 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 160 insertions(+)

diff --git a/gnu/packages/sync.scm b/gnu/packages/sync.scm
index d7c9009f3b..9aa7e9f866 100644
--- a/gnu/packages/sync.scm
+++ b/gnu/packages/sync.scm
@@ -30,6 +30,7 @@
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system go)
   #:use-module (guix build-system meson)
+  #:use-module (guix build-system qt)
   #:use-module (guix download)
   #:use-module (guix git-download)
   #:use-module (guix packages)
@@ -42,8 +43,11 @@
   #:use-module (gnu packages crypto)
   #:use-module (gnu packages curl)
   #:use-module (gnu packages documentation)
+  #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages glib)
+  #:use-module (gnu packages gnome)
   #:use-module (gnu packages golang)
+  #:use-module (gnu packages graphviz)
   #:use-module (gnu packages image)
   #:use-module (gnu packages kde-frameworks)
   #:use-module (gnu packages linux)
@@ -52,15 +56,171 @@
   #:use-module (gnu packages pcre)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages python)
+  #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages qt)
   #:use-module (gnu packages readline)
   #:use-module (gnu packages rsync)
+  #:use-module (gnu packages ruby)
   #:use-module (gnu packages selinux)
   #:use-module (gnu packages shells)
   #:use-module (gnu packages sphinx)
   #:use-module (gnu packages sqlite)
   #:use-module (gnu packages tls))
 
+(define-public nextcloud-client
+  (package
+    (name "nextcloud-client")
+    (version "3.1.3")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://github.com/nextcloud/desktop")
+         (commit
+          (string-append "v" version))))
+       (file-name
+        (git-file-name name version))
+       (sha256
+        (base32 "15ymk3gvfmgwzmqbhlw7jjy9y65ib3391h1dlmpll65iaj2miajk"))
+       (modules '((guix build utils)
+                  (ice-9 ftw)
+                  (srfi srfi-1)))
+       (snippet
+        `(begin
+           ;; Not available in Guix.
+           (let* ((keep '("QProgressIndicator" "qtokenizer")))
+             (with-directory-excursion "src/3rdparty"
+               (for-each delete-file-recursively
+                         (lset-difference string=?
+                                          (scandir ".")
+                                          (cons* "." ".." keep))))
+             #t)))))
+    (build-system qt-build-system)
+    (arguments
+     `(#:configure-flags
+       (list
+        "-DUNIT_TESTING=ON"
+        ;; Upstream Bug: https://github.com/nextcloud/desktop/issues/2885
+        "-DNO_SHIBBOLETH=ON")
+       #: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))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-source
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (with-directory-excursion "src/gui"
+               (substitute* "CMakeLists.txt"
+                 ;; Remove source references of deleted 3rdparties.
+                 (("[ \t]*\\.\\./3rdparty/qtlockedfile/?.*\\.cpp")
+                  "")
+                 (("[ \t]*\\.\\./3rdparty/qtsingleapplication/?.*\\.cpp")
+                  "")
+                 (("[ \t]*\\.\\./3rdparty/kmessagewidget/?.*\\.cpp")
+                  "")
+                 (("[ \t]*list\\(APPEND 3rdparty_SRC \\.\\./3rdparty/?.*\\)")
+                  "")
+                 ;; Patch include references of deleted 3rdparties to inputs.
+                 (("\\$\\{CMAKE_SOURCE_DIR\\}/src/3rdparty/qtlockedfile")
+                  (string-append (assoc-ref inputs "qtsolutions")
+                                 "/include/qtlockedfile/"))
+                 (("\\$\\{CMAKE_SOURCE_DIR\\}/src/3rdparty/qtsingleapplication")
+                  (string-append (assoc-ref inputs "qtsolutions")
+                                 "/include/qtsingleapplication/"))
+                 (("\\$\\{CMAKE_SOURCE_DIR\\}/src/3rdparty/kmessagewidget")
+                  (string-append (assoc-ref inputs "kwidgetsaddons")
+                                 "/include/KF5/KWidgetsAddons/"))
+                 ;; Link libraries from inputs that were deleted in 3rdparty.
+                 (("\\$\\{synclib_NAME\\}")
+                  (string-append "${synclib_NAME} "
+                                 "QtSolutions_LockedFile "
+                                 "QtSolutions_SingleApplication "
+                                 "KF5WidgetsAddons")))
+               ;; Fix compatibility with QtSingleApplication from QtSolutions.
+               (substitute* '("application.h" "application.cpp")
+                 (("SharedTools::QtSingleApplication")
+                  "QtSingleApplication")
+                 (("slotParseMessage\\(const QString &(msg)?.*\\)")
+                  "slotParseMessage(const QString &msg)")))
+             #t))
+         (add-after 'patch-source 'patch-cmake
+           (lambda* (#:key outputs #:allow-other-keys)
+             ;; Patch install directory for dbus service files.
+             (substitute* "shell_integration/libcloudproviders/CMakeLists.txt"
+               (("PKGCONFIG_GETVAR\\(.+ _install_dir\\)")
+                (string-append "set(_install_dir \"${CMAKE_INSTALL_PREFIX}"
+                               "/share/dbus-1/services\")")))
+             ;; Make sure, that Qt modules are installed under $prefix.
+             (substitute* "shell_integration/dolphin/CMakeLists.txt"
+               (("ON CACHE")
+                "OFF CACHE"))
+             #t))
+         (add-before 'check 'pre-check
+           (lambda _
+             ;; 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)))))
+    (native-inputs
+     `(("cmocka" ,cmocka)
+       ("dot" ,graphviz)
+       ("doxygen" ,doxygen)
+       ("extra-cmake-modules" ,extra-cmake-modules)
+       ("glib:bin" ,glib "bin")
+       ("perl" ,perl)
+       ("pkg-config" ,pkg-config)
+       ("python" ,python-wrapper)
+       ("qttools" ,qttools)
+       ("ruby" ,ruby)))
+    (inputs
+     `(("appstream" ,appstream)
+       ("glib" ,glib)
+       ("kconfig" ,kconfig)
+       ("kcoreaddons" ,kcoreaddons)
+       ("kio" ,kio)
+       ("kjs" ,kjs)
+       ("kwidgetsaddons" ,kwidgetsaddons)
+       ("libcloudproviders" ,libcloudproviders)
+       ("libzip" ,libzip)
+       ("openssl" ,openssl)
+       ("python-nautilus" ,python-nautilus)
+       ("qtbase" ,qtbase)
+       ("qtdeclarative" ,qtdeclarative)
+       ("qtgraphicaleffects" ,qtgraphicaleffects)
+       ("qtkeychain" ,qtkeychain)
+       ("qtquickcontrols2" ,qtquickcontrols2)
+       ("qtsolutions" ,qtsolutions)
+       ("qtsvg" ,qtsvg)
+       ("qtwebchannel" ,qtwebchannel)
+       ("qtwebsockets" ,qtwebsockets)
+       ("qtwebkit" ,qtwebkit)
+       ("sqlite" ,sqlite)
+       ("zlib" ,zlib)))
+    (propagated-inputs
+     `(("qtwebengine" ,qtwebengine)))
+    (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/install/#install-clients")
+    (license
+     (list
+      ;; QtProgressIndicator
+      license:expat
+      ;; Qtokenizer
+      license:lgpl2.1+
+      ;; Others
+      license:gpl2+))))
+
 (define-public megacmd
   (package
     (name "megacmd")
-- 
2.30.1


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [bug#45889] Nextcloud Client (v16)
  2021-03-09 10:50                                       ` [bug#45889] Nextcloud Client (v16) Raghav Gururajan via Guix-patches via
@ 2021-03-09 11:39                                         ` Leo Prikler
  2021-03-09 12:29                                           ` Raghav Gururajan via Guix-patches via
  0 siblings, 1 reply; 44+ messages in thread
From: Leo Prikler @ 2021-03-09 11:39 UTC (permalink / raw)
  To: Raghav Gururajan, 45889

Hi Raghav,

Mostly LGTM.

Am Dienstag, den 09.03.2021, 05:50 -0500 schrieb Raghav Gururajan:
> > Definitely deserves a comment and perhaps a less broad match?
> 
> Done the comment.
> 
> I think this is perfect match. The mentioned libraries will get
> linked 
> wherever synclib gets linked. Also, this patch is compatible with 
> current master, which is different from this version.
Perhaps the comment should reflect that a little better.  You might
also want to expand that during the unvendoring in the snippet, so that
it's less confusing.

> +                                    `(("src" ,(string-append
> "include/" solution)
> +                                       #:include-regexp ("\\.h$"))
I think you should unvendor dependencies between the solutions, so that
you can put them in "include/" directly (like putting the solutions in
"/lib").

Regards,
Leo





^ permalink raw reply	[flat|nested] 44+ messages in thread

* [bug#45889] Nextcloud Client (v16)
  2021-03-09 11:39                                         ` Leo Prikler
@ 2021-03-09 12:29                                           ` Raghav Gururajan via Guix-patches via
  2021-03-09 12:43                                             ` [bug#45889] Nextcloud Client (v17) Leo Prikler
  0 siblings, 1 reply; 44+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-03-09 12:29 UTC (permalink / raw)
  To: Leo Prikler, 45889


[-- Attachment #1.1.1: Type: text/plain, Size: 412 bytes --]

Hi Leo!

> Perhaps the comment should reflect that a little better.  You might
> also want to expand that during the unvendoring in the snippet, so that
> it's less confusing.

Done.

> I think you should unvendor dependencies between the solutions, so that
> you can put them in "include/" directly (like putting the solutions in
> "/lib").

Done.

Please find the attached v17.

Regards,
RG.

[-- Attachment #1.1.2: 0001-gnu-Add-appstream.patch --]
[-- Type: text/x-patch, Size: 5539 bytes --]

From daad8ffd22e8f000a1569ca45b415e28b4e20798 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <rg@raghavgururajan.name>
Date: Thu, 14 Jan 2021 23:32:27 -0500
Subject: [PATCH 1/3] gnu: Add appstream.

* gnu/packages/freedesktop.scm (appstream): New variable.
---
 gnu/packages/freedesktop.scm | 96 ++++++++++++++++++++++++++++++++++++
 1 file changed, 96 insertions(+)

diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index e00454f7b3..60fa080c9d 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -58,8 +58,10 @@
   #:use-module (gnu packages bash)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
+  #:use-module (gnu packages cmake)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages cryptsetup)
+  #:use-module (gnu packages databases)
   #:use-module (gnu packages disk)
   #:use-module (gnu packages docbook)
   #:use-module (gnu packages documentation)
@@ -75,6 +77,7 @@
   #:use-module (gnu packages gstreamer)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages image)
+  #:use-module (gnu packages language)
   #:use-module (gnu packages libffi)
   #:use-module (gnu packages libunwind)
   #:use-module (gnu packages libusb)
@@ -101,6 +104,99 @@
   #:use-module (gnu packages xorg)
   #:use-module (srfi srfi-1))
 
+(define-public appstream
+  (package
+    (name "appstream")
+    (version "0.13.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append "https://www.freedesktop.org/software/"
+                       "appstream/releases/"
+                       "AppStream-" version ".tar.xz"))
+       (sha256
+        (base32 "09l6ixz1w29pi0nb0flz14m4r3f2hpqpp1fq8y66v9xa4c9fczds"))))
+    (build-system meson-build-system)
+    (arguments
+     `(#:glib-or-gtk? #t
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-libstemmer
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "meson.build"
+               (("/usr/include")
+                (string-append (assoc-ref inputs "libstemmer")
+                               "/include")))
+             #t))
+         (add-after 'patch-libstemmer 'patch-docbook-xml
+           (lambda* (#:key inputs #:allow-other-keys)
+             (with-directory-excursion "docs/api"
+               (substitute* "appstream-docs.xml"
+                 (("http://www.oasis-open.org/docbook/xml/4.3/")
+                  (string-append (assoc-ref inputs "docbook-xml-4.3")
+                                 "/xml/dtd/docbook/"))))
+             (for-each (lambda (file)
+                         (substitute* file
+                           (("http://www.oasis-open.org/docbook/xml/4.5/")
+                            (string-append (assoc-ref inputs "docbook-xml")
+                                           "/xml/dtd/docbook/"))))
+                       (find-files "scripts/desc" "\\.xml$"))
+             #t))
+         (add-after 'patch-docbook-xml 'disable-failing-tests
+           (lambda _
+             (substitute* "tests/test-pool.c"
+               (("[ \t]*g_test_add_func \\(\"/AppStream/PoolRead?.*;")
+                "")
+               (("[ \t]*g_test_add_func \\(\"/AppStream/PoolReadAsync?.*;")
+                "")
+               (("[ \t]*g_test_add_func \\(\"/AppStream/PoolEmpty?.*;")
+                "")
+               (("[ \t]*g_test_add_func \\(\"/AppStream/Cache?.*;")
+                "")
+               (("[ \t]*g_test_add_func \\(\"/AppStream/Merges?.*;")
+                ""))
+             #t))
+         (add-after 'disable-failing-tests 'patch-install-dir
+           (lambda* (#:key outputs #:allow-other-keys)
+             (substitute* "data/meson.build"
+               (("/etc")
+                (string-append (assoc-ref outputs "out")
+                               "/etc")))
+             #t)))))
+    (native-inputs
+     `(("cmake" ,cmake)
+       ("docbook-xml-4.3" ,docbook-xml-4.3)
+       ("docbook-xml" ,docbook-xml)
+       ("docbook-xsl" ,docbook-xsl)
+       ("gettext" ,gettext-minimal)
+       ("glib:bin" ,glib "bin")
+       ("gobject-introspection" ,gobject-introspection)
+       ("gperf" ,gperf)
+       ("gtk-doc" ,gtk-doc)
+       ("pkg-config" ,pkg-config)
+       ("python" ,python-wrapper)
+       ("xsltproc" ,libxslt)))
+    (inputs
+     `(("libsoup" ,libsoup)
+       ("libstemmer" ,libstemmer)
+       ("libxml2" ,libxml2)
+       ("libyaml" ,libyaml)
+       ("lmdb" ,lmdb)))
+    (propagated-inputs
+     `(("glib" ,glib)))
+    (synopsis "Tools and libraries to work with AppStream metadata")
+    (description "AppStream is a cross-distribution effort for enhancing the way
+we interact with the software repositories provided by distributions by
+standardizing software component metadata.  It provides the foundation to build
+software-center applications, by providing metadata necessary for an
+application-centric view on package repositories.  It additionally provides
+specifications for things like an unified software metadata database, screenshot
+services and various other things needed to create user-friendly
+application-centers for distributions.")
+    (home-page "https://www.freedesktop.org/wiki/Distributions/AppStream/")
+    (license license:gpl2+)))
+
 (define-public farstream
   (package
     (name "farstream")
-- 
2.30.1


[-- Attachment #1.1.3: 0002-gnu-Add-qtsolutions.patch --]
[-- Type: text/x-patch, Size: 4865 bytes --]

From a957e967b10cb1ad87e5e01239b90b954f9eb532 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <rg@raghavgururajan.name>
Date: Tue, 9 Mar 2021 02:14:56 -0500
Subject: [PATCH 2/3] gnu: Add qtsolutions.

* gnu/packages/qt.scm (qtsolutions): New variable.
---
 gnu/packages/qt.scm | 95 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 95 insertions(+)

diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 11e69ff5db..96efbce7fc 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -105,6 +105,101 @@
   #:use-module (gnu packages xml)
   #:use-module (srfi srfi-1))
 
+(define-public qtsolutions
+  (let ((commit "9568abd142d581b67b86a5f63d823a34b0612702")
+        (revision "53"))
+    (package
+      (name "qtsolutions")
+      (version
+       (git-version "0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri
+          (git-reference
+           (url "https://github.com/qtproject/qt-solutions")
+           (commit commit)))
+         (file-name
+          (git-file-name name version))
+         (sha256
+          (base32 "17fnmassflm3vxi0krpr6fff368jy38cby31a48rban4nqqmgx7n"))))
+      (build-system gnu-build-system)
+      (arguments
+       `(#:tests? #f                    ; No target
+         #:imported-modules
+         ((guix build copy-build-system)
+          ,@%gnu-build-system-modules)
+         #:modules
+         (((guix build copy-build-system)
+           #:prefix copy:)
+          (guix build gnu-build-system)
+          (guix build utils))
+         #:phases
+         (modify-phases %standard-phases
+           (add-after 'unpack 'patch-source
+             (lambda* (#:key outputs #:allow-other-keys)
+               (substitute* (find-files "." "common.pri")
+                 ;; Remove prefix in library names.
+                 (("qt5") "qt")
+                 ;; Remove suffix in library names.
+                 (("-head") ""))
+               ;; Disable building of examples.
+               (substitute* (find-files "." "\\.pro$")
+                 (("SUBDIRS\\+=examples") ""))
+               ;; Fix deprecated functions.
+               (substitute* "qtsoap/src/qtsoap.cpp"
+                 (("toAscii") "toUtf8"))
+               #t))
+           (replace 'configure
+             (lambda _
+               (for-each (lambda (solution)
+                           (with-directory-excursion solution
+                             (invoke "./configure" "-library")
+                             (invoke "qmake")))
+                         '("qtlockedfile" "qtpropertybrowser" "qtservice"
+                           "qtsingleapplication" "qtsoap"))
+               #t))
+           (replace 'build
+             (lambda _
+               (for-each (lambda (solution)
+                           (with-directory-excursion solution
+                             (invoke "make")))
+                         '("qtlockedfile" "qtpropertybrowser" "qtservice"
+                           "qtsingleapplication" "qtsoap"))
+               #t))
+           (replace 'install
+             (lambda args
+               ;; Remove an redundant header file,
+               ;; before it gets attempted for installation.
+               (delete-file "qtsingleapplication/src/qtlockedfile.h")
+               (for-each (lambda (solution)
+                           (with-directory-excursion solution
+                             (apply (assoc-ref copy:%standard-phases 'install)
+                                    #:install-plan
+                                    '(("src" "include"
+                                       #:include-regexp ("\\.h$"))
+                                      ("lib" "lib"))
+                                    args)))
+                         '("qtlockedfile" "qtpropertybrowser" "qtservice"
+                           "qtsingleapplication" "qtsoap")))))))
+      (inputs
+       `(("qtbase" ,qtbase)))
+      (synopsis "Qt Solutions")
+      (description "QtSolutions are set of components that extends Qt.
+@itemize
+@item QtLockedFile: A class that extends QFile with advisory locking functions.
+@item QtPropertyBrowser: A framework that enables the user to edit a set of
+properties.
+@item QtService: A component useful for developing Windows services and Unix
+daemons.
+@item QtSingleApplication: A component that provides support for applications
+that can be only started once per user.
+@item QtSoap: A component that provides basic web service support with version
+1.1 of the SOAP protocol.
+@end itemize\n")
+      (home-page "https://doc.qt.io/archives/qq/qq09-qt-solutions.html")
+      (license license:lgpl2.1+))))
+
 (define-public qt5ct
   (package
     (name "qt5ct")
-- 
2.30.1


[-- Attachment #1.1.4: 0003-gnu-Add-nextcloud-client.patch --]
[-- Type: text/x-patch, Size: 8449 bytes --]

From 7264b154be9d54b451bb02fbd2b2fc8c8edf91e2 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <rg@raghavgururajan.name>
Date: Tue, 9 Mar 2021 02:19:00 -0500
Subject: [PATCH 3/3] gnu: Add nextcloud-client.

* gnu/packages/messaging.scm (nextcloud-client): New variable.
---
 gnu/packages/sync.scm | 162 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 162 insertions(+)

diff --git a/gnu/packages/sync.scm b/gnu/packages/sync.scm
index d7c9009f3b..cfeb5739fd 100644
--- a/gnu/packages/sync.scm
+++ b/gnu/packages/sync.scm
@@ -30,6 +30,7 @@
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system go)
   #:use-module (guix build-system meson)
+  #:use-module (guix build-system qt)
   #:use-module (guix download)
   #:use-module (guix git-download)
   #:use-module (guix packages)
@@ -42,8 +43,11 @@
   #:use-module (gnu packages crypto)
   #:use-module (gnu packages curl)
   #:use-module (gnu packages documentation)
+  #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages glib)
+  #:use-module (gnu packages gnome)
   #:use-module (gnu packages golang)
+  #:use-module (gnu packages graphviz)
   #:use-module (gnu packages image)
   #:use-module (gnu packages kde-frameworks)
   #:use-module (gnu packages linux)
@@ -52,15 +56,173 @@
   #:use-module (gnu packages pcre)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages python)
+  #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages qt)
   #:use-module (gnu packages readline)
   #:use-module (gnu packages rsync)
+  #:use-module (gnu packages ruby)
   #:use-module (gnu packages selinux)
   #:use-module (gnu packages shells)
   #:use-module (gnu packages sphinx)
   #:use-module (gnu packages sqlite)
   #:use-module (gnu packages tls))
 
+(define-public nextcloud-client
+  (package
+    (name "nextcloud-client")
+    (version "3.1.3")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://github.com/nextcloud/desktop")
+         (commit
+          (string-append "v" version))))
+       (file-name
+        (git-file-name name version))
+       (sha256
+        (base32 "15ymk3gvfmgwzmqbhlw7jjy9y65ib3391h1dlmpll65iaj2miajk"))
+       (modules '((guix build utils)
+                  (ice-9 ftw)
+                  (srfi srfi-1)))
+       (snippet
+        `(begin
+           ;; Not available in Guix.
+           (let* ((keep '("QProgressIndicator" "qtokenizer")))
+             (with-directory-excursion "src/3rdparty"
+               (for-each delete-file-recursively
+                         (lset-difference string=?
+                                          (scandir ".")
+                                          (cons* "." ".." keep))))
+             #t)))))
+    (build-system qt-build-system)
+    (arguments
+     `(#:configure-flags
+       (list
+        "-DUNIT_TESTING=ON"
+        ;; Upstream Bug: https://github.com/nextcloud/desktop/issues/2885
+        "-DNO_SHIBBOLETH=ON")
+       #: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))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-source
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (with-directory-excursion "src/gui"
+               (substitute* "CMakeLists.txt"
+                 ;; Remove references of deleted 3rdparties.
+                 (("[ \t]*\\.\\./3rdparty/qtlockedfile/?.*\\.cpp")
+                  "")
+                 (("[ \t]*\\.\\./3rdparty/qtsingleapplication/?.*\\.cpp")
+                  "")
+                 (("[ \t]*\\.\\./3rdparty/kmessagewidget/?.*\\.cpp")
+                  "")
+                 (("[ \t]*list\\(APPEND 3rdparty_SRC \\.\\./3rdparty/?.*\\)")
+                  "")
+                 (("\\$\\{CMAKE_SOURCE_DIR\\}/src/3rdparty/qtlockedfile")
+                  "")
+                 (("\\$\\{CMAKE_SOURCE_DIR\\}/src/3rdparty/qtsingleapplication")
+                  "")
+                 ;; Patch include reference of KMessageWidget,
+                 ;; to point to KWidgetsAddons, instead of 3rdparty.
+                 (("\\$\\{CMAKE_SOURCE_DIR\\}/src/3rdparty/kmessagewidget")
+                  (string-append (assoc-ref inputs "kwidgetsaddons")
+                                 "/include/KF5/KWidgetsAddons/"))
+                 ;; Link libraries from inputs, that were deleted in 3rdparty,
+                 ;; to wherever synclib gets linked.
+                 (("\\$\\{synclib_NAME\\}")
+                  (string-append "${synclib_NAME} "
+                                 "QtSolutions_LockedFile "
+                                 "QtSolutions_SingleApplication "
+                                 "KF5WidgetsAddons")))
+               ;; Fix compatibility with QtSingleApplication from QtSolutions.
+               (substitute* '("application.h" "application.cpp")
+                 (("SharedTools::QtSingleApplication")
+                  "QtSingleApplication")
+                 (("slotParseMessage\\(const QString &(msg)?.*\\)")
+                  "slotParseMessage(const QString &msg)")))
+             #t))
+         (add-after 'patch-source 'patch-cmake
+           (lambda* (#:key outputs #:allow-other-keys)
+             ;; Patch install directory for dbus service files.
+             (substitute* "shell_integration/libcloudproviders/CMakeLists.txt"
+               (("PKGCONFIG_GETVAR\\(.+ _install_dir\\)")
+                (string-append "set(_install_dir \"${CMAKE_INSTALL_PREFIX}"
+                               "/share/dbus-1/services\")")))
+             ;; Make sure, that Qt modules are installed under $prefix.
+             (substitute* "shell_integration/dolphin/CMakeLists.txt"
+               (("ON CACHE")
+                "OFF CACHE"))
+             #t))
+         (add-before 'check 'pre-check
+           (lambda _
+             ;; 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)))))
+    (native-inputs
+     `(("cmocka" ,cmocka)
+       ("dot" ,graphviz)
+       ("doxygen" ,doxygen)
+       ("extra-cmake-modules" ,extra-cmake-modules)
+       ("glib:bin" ,glib "bin")
+       ("perl" ,perl)
+       ("pkg-config" ,pkg-config)
+       ("python" ,python-wrapper)
+       ("qttools" ,qttools)
+       ("ruby" ,ruby)))
+    (inputs
+     `(("appstream" ,appstream)
+       ("desktop-file-utils" ,desktop-file-utils)
+       ("glib" ,glib)
+       ("kconfig" ,kconfig)
+       ("kcoreaddons" ,kcoreaddons)
+       ("kio" ,kio)
+       ("kjs" ,kjs)
+       ("kwidgetsaddons" ,kwidgetsaddons)
+       ("libcloudproviders" ,libcloudproviders)
+       ("libzip" ,libzip)
+       ("openssl" ,openssl)
+       ("python-nautilus" ,python-nautilus)
+       ("qtbase" ,qtbase)
+       ("qtdeclarative" ,qtdeclarative)
+       ("qtgraphicaleffects" ,qtgraphicaleffects)
+       ("qtkeychain" ,qtkeychain)
+       ("qtquickcontrols2" ,qtquickcontrols2)
+       ("qtsolutions" ,qtsolutions)
+       ("qtsvg" ,qtsvg)
+       ("qtwebchannel" ,qtwebchannel)
+       ("qtwebsockets" ,qtwebsockets)
+       ("qtwebkit" ,qtwebkit)
+       ("sqlite" ,sqlite)
+       ("xdg-utils" ,xdg-utils)
+       ("zlib" ,zlib)))
+    (propagated-inputs
+     `(("qtwebengine" ,qtwebengine)))
+    (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/install/#install-clients")
+    (license
+     (list
+      ;; QtProgressIndicator
+      license:expat
+      ;; Qtokenizer
+      license:lgpl2.1+
+      ;; Others
+      license:gpl2+))))
+
 (define-public megacmd
   (package
     (name "megacmd")
-- 
2.30.1


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [bug#45889] Nextcloud Client (v17)
  2021-03-09 12:29                                           ` Raghav Gururajan via Guix-patches via
@ 2021-03-09 12:43                                             ` Leo Prikler
  2021-03-09 15:16                                               ` [bug#45889] Nextcloud Client (v18) Raghav Gururajan via Guix-patches via
  0 siblings, 1 reply; 44+ messages in thread
From: Leo Prikler @ 2021-03-09 12:43 UTC (permalink / raw)
  To: Raghav Gururajan, 45889

Am Dienstag, den 09.03.2021, 07:29 -0500 schrieb Raghav Gururajan:
> Hi Leo!
> 
> > Perhaps the comment should reflect that a little better.  You might
> > also want to expand that during the unvendoring in the snippet, so
> > that
> > it's less confusing.
> 
> Done.
The comment certainly improved FSVO improved, but it somehow does not
reduce my bikeshedding mood.  In particular, I feel like we ought to do
this in the snippet.

> > I think you should unvendor dependencies between the solutions, so
> > that
> > you can put them in "include/" directly (like putting the solutions
> > in
> > "/lib").
> 
> Done.
You just masked an install error without actually unvendoring
dependencies.

Regards,
Leo





^ permalink raw reply	[flat|nested] 44+ messages in thread

* [bug#45889] Nextcloud Client (v18)
  2021-03-09 12:43                                             ` [bug#45889] Nextcloud Client (v17) Leo Prikler
@ 2021-03-09 15:16                                               ` Raghav Gururajan via Guix-patches via
  2021-03-09 23:24                                                 ` bug#45889: " Leo Prikler
  0 siblings, 1 reply; 44+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-03-09 15:16 UTC (permalink / raw)
  To: Leo Prikler, 45889


[-- Attachment #1.1.1: Type: text/plain, Size: 347 bytes --]

Hi Leo!

> The comment certainly improved FSVO improved, but it somehow does not
> reduce my bikeshedding mood.  In particular, I feel like we ought to do
> this in the snippet.

Moved to snippet.

> You just masked an install error without actually unvendoring
> dependencies.

Done.

Please find the attached v18.

Regards,
RG.

[-- Attachment #1.1.2: 0001-gnu-Add-appstream.patch --]
[-- Type: text/x-patch, Size: 5539 bytes --]

From daad8ffd22e8f000a1569ca45b415e28b4e20798 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <rg@raghavgururajan.name>
Date: Thu, 14 Jan 2021 23:32:27 -0500
Subject: [PATCH 1/3] gnu: Add appstream.

* gnu/packages/freedesktop.scm (appstream): New variable.
---
 gnu/packages/freedesktop.scm | 96 ++++++++++++++++++++++++++++++++++++
 1 file changed, 96 insertions(+)

diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index e00454f7b3..60fa080c9d 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -58,8 +58,10 @@
   #:use-module (gnu packages bash)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
+  #:use-module (gnu packages cmake)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages cryptsetup)
+  #:use-module (gnu packages databases)
   #:use-module (gnu packages disk)
   #:use-module (gnu packages docbook)
   #:use-module (gnu packages documentation)
@@ -75,6 +77,7 @@
   #:use-module (gnu packages gstreamer)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages image)
+  #:use-module (gnu packages language)
   #:use-module (gnu packages libffi)
   #:use-module (gnu packages libunwind)
   #:use-module (gnu packages libusb)
@@ -101,6 +104,99 @@
   #:use-module (gnu packages xorg)
   #:use-module (srfi srfi-1))
 
+(define-public appstream
+  (package
+    (name "appstream")
+    (version "0.13.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append "https://www.freedesktop.org/software/"
+                       "appstream/releases/"
+                       "AppStream-" version ".tar.xz"))
+       (sha256
+        (base32 "09l6ixz1w29pi0nb0flz14m4r3f2hpqpp1fq8y66v9xa4c9fczds"))))
+    (build-system meson-build-system)
+    (arguments
+     `(#:glib-or-gtk? #t
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-libstemmer
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "meson.build"
+               (("/usr/include")
+                (string-append (assoc-ref inputs "libstemmer")
+                               "/include")))
+             #t))
+         (add-after 'patch-libstemmer 'patch-docbook-xml
+           (lambda* (#:key inputs #:allow-other-keys)
+             (with-directory-excursion "docs/api"
+               (substitute* "appstream-docs.xml"
+                 (("http://www.oasis-open.org/docbook/xml/4.3/")
+                  (string-append (assoc-ref inputs "docbook-xml-4.3")
+                                 "/xml/dtd/docbook/"))))
+             (for-each (lambda (file)
+                         (substitute* file
+                           (("http://www.oasis-open.org/docbook/xml/4.5/")
+                            (string-append (assoc-ref inputs "docbook-xml")
+                                           "/xml/dtd/docbook/"))))
+                       (find-files "scripts/desc" "\\.xml$"))
+             #t))
+         (add-after 'patch-docbook-xml 'disable-failing-tests
+           (lambda _
+             (substitute* "tests/test-pool.c"
+               (("[ \t]*g_test_add_func \\(\"/AppStream/PoolRead?.*;")
+                "")
+               (("[ \t]*g_test_add_func \\(\"/AppStream/PoolReadAsync?.*;")
+                "")
+               (("[ \t]*g_test_add_func \\(\"/AppStream/PoolEmpty?.*;")
+                "")
+               (("[ \t]*g_test_add_func \\(\"/AppStream/Cache?.*;")
+                "")
+               (("[ \t]*g_test_add_func \\(\"/AppStream/Merges?.*;")
+                ""))
+             #t))
+         (add-after 'disable-failing-tests 'patch-install-dir
+           (lambda* (#:key outputs #:allow-other-keys)
+             (substitute* "data/meson.build"
+               (("/etc")
+                (string-append (assoc-ref outputs "out")
+                               "/etc")))
+             #t)))))
+    (native-inputs
+     `(("cmake" ,cmake)
+       ("docbook-xml-4.3" ,docbook-xml-4.3)
+       ("docbook-xml" ,docbook-xml)
+       ("docbook-xsl" ,docbook-xsl)
+       ("gettext" ,gettext-minimal)
+       ("glib:bin" ,glib "bin")
+       ("gobject-introspection" ,gobject-introspection)
+       ("gperf" ,gperf)
+       ("gtk-doc" ,gtk-doc)
+       ("pkg-config" ,pkg-config)
+       ("python" ,python-wrapper)
+       ("xsltproc" ,libxslt)))
+    (inputs
+     `(("libsoup" ,libsoup)
+       ("libstemmer" ,libstemmer)
+       ("libxml2" ,libxml2)
+       ("libyaml" ,libyaml)
+       ("lmdb" ,lmdb)))
+    (propagated-inputs
+     `(("glib" ,glib)))
+    (synopsis "Tools and libraries to work with AppStream metadata")
+    (description "AppStream is a cross-distribution effort for enhancing the way
+we interact with the software repositories provided by distributions by
+standardizing software component metadata.  It provides the foundation to build
+software-center applications, by providing metadata necessary for an
+application-centric view on package repositories.  It additionally provides
+specifications for things like an unified software metadata database, screenshot
+services and various other things needed to create user-friendly
+application-centers for distributions.")
+    (home-page "https://www.freedesktop.org/wiki/Distributions/AppStream/")
+    (license license:gpl2+)))
+
 (define-public farstream
   (package
     (name "farstream")
-- 
2.30.1


[-- Attachment #1.1.3: 0002-gnu-Add-qtsolutions.patch --]
[-- Type: text/x-patch, Size: 5991 bytes --]

From 583680270594522b0061d8c5a0f13067180de7a8 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <rg@raghavgururajan.name>
Date: Tue, 9 Mar 2021 02:14:56 -0500
Subject: [PATCH 2/3] gnu: Add qtsolutions.

* gnu/packages/qt.scm (qtsolutions): New variable.
---
 gnu/packages/qt.scm | 120 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 120 insertions(+)

diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 11e69ff5db..4ff1e6a005 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -105,6 +105,126 @@
   #:use-module (gnu packages xml)
   #:use-module (srfi srfi-1))
 
+(define-public qtsolutions
+  (let ((commit "9568abd142d581b67b86a5f63d823a34b0612702")
+        (revision "53"))
+    (package
+      (name "qtsolutions")
+      (version
+       (git-version "0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri
+          (git-reference
+           (url "https://github.com/qtproject/qt-solutions")
+           (commit commit)))
+         (file-name
+          (git-file-name name version))
+         (sha256
+          (base32 "17fnmassflm3vxi0krpr6fff368jy38cby31a48rban4nqqmgx7n"))
+         (modules '((guix build utils)
+                    (ice-9 ftw)
+                    (srfi srfi-1)))
+         (snippet
+          ;; Unvendor QtLockFile from QtSingleApplication.
+          `(begin
+             (with-directory-excursion "qtsingleapplication/src"
+               (for-each delete-file
+                         (find-files "." "qtlockedfile.*\\.(h|cpp)"))
+                 (substitute* "qtsingleapplication.pri"
+                   ;; Add include path of LockedFile.
+                   (("INCLUDEPATH \\+=")
+                    "INCLUDEPATH += ../../qtlockedfile/src")
+                   ;; Link library of LockedFile.
+                   (("LIBS \\+=")
+                    "LIBS += -lQtSolutions_LockedFile"))
+                 (substitute* '("qtlocalpeer.h" "qtlocalpeer.cpp")
+                   ;; Remove references to deleted LockedFile sources.
+                   (("#include \"qtlockedfile.cpp\"")
+                    "")
+                   (("#include \"qtlockedfile_win.cpp\"")
+                    "")
+                   (("#include \"qtlockedfile_unix.cpp\"")
+                    "")
+                   ;; Fix LockedFile API.
+                   (("QtLP_Private::QtLockedFile")
+                    "QtLockedFile")))
+             #t))))
+      (build-system gnu-build-system)
+      (arguments
+       `(#:tests? #f                    ; No target
+         #:imported-modules
+         ((guix build copy-build-system)
+          ,@%gnu-build-system-modules)
+         #:modules
+         (((guix build copy-build-system)
+           #:prefix copy:)
+          (guix build gnu-build-system)
+          (guix build utils))
+         #:phases
+         (modify-phases %standard-phases
+           (add-after 'unpack 'patch-source
+             (lambda* (#:key outputs #:allow-other-keys)
+               (substitute* (find-files "." "common.pri")
+                 ;; Remove prefix in library names.
+                 (("qt5") "qt")
+                 ;; Remove suffix in library names.
+                 (("-head") ""))
+               ;; Disable building of examples.
+               (substitute* (find-files "." "\\.pro$")
+                 (("SUBDIRS\\+=examples") ""))
+               ;; Fix deprecated functions.
+               (substitute* "qtsoap/src/qtsoap.cpp"
+                 (("toAscii") "toUtf8"))
+               #t))
+           (replace 'configure
+             (lambda _
+               (for-each (lambda (solution)
+                           (with-directory-excursion solution
+                             (invoke "./configure" "-library")
+                             (invoke "qmake")))
+                         '("qtlockedfile" "qtpropertybrowser" "qtservice"
+                           "qtsingleapplication" "qtsoap"))
+               #t))
+           (replace 'build
+             (lambda _
+               (for-each (lambda (solution)
+                           (with-directory-excursion solution
+                             (invoke "make")))
+                         '("qtlockedfile" "qtpropertybrowser" "qtservice"
+                           "qtsingleapplication" "qtsoap"))
+               #t))
+           (replace 'install
+             (lambda args
+               (for-each (lambda (solution)
+                           (with-directory-excursion solution
+                             (apply (assoc-ref copy:%standard-phases 'install)
+                                    #:install-plan
+                                    '(("src" "include"
+                                       #:include-regexp ("\\.h$"))
+                                      ("lib" "lib"))
+                                    args)))
+                         '("qtlockedfile" "qtpropertybrowser" "qtservice"
+                           "qtsingleapplication" "qtsoap")))))))
+      (inputs
+       `(("qtbase" ,qtbase)))
+      (synopsis "Qt Solutions")
+      (description "QtSolutions are set of components that extends Qt.
+@itemize
+@item QtLockedFile: A class that extends QFile with advisory locking functions.
+@item QtPropertyBrowser: A framework that enables the user to edit a set of
+properties.
+@item QtService: A component useful for developing Windows services and Unix
+daemons.
+@item QtSingleApplication: A component that provides support for applications
+that can be only started once per user.
+@item QtSoap: A component that provides basic web service support with version
+1.1 of the SOAP protocol.
+@end itemize\n")
+      (home-page "https://doc.qt.io/archives/qq/qq09-qt-solutions.html")
+      (license license:lgpl2.1+))))
+
 (define-public qt5ct
   (package
     (name "qt5ct")
-- 
2.30.1


[-- Attachment #1.1.4: 0003-gnu-Add-nextcloud-client.patch --]
[-- Type: text/x-patch, Size: 8178 bytes --]

From 573af53f9a5b69b857daefe3d6471eef42783782 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <rg@raghavgururajan.name>
Date: Tue, 9 Mar 2021 02:19:00 -0500
Subject: [PATCH 3/3] gnu: Add nextcloud-client.

* gnu/packages/messaging.scm (nextcloud-client): New variable.
---
 gnu/packages/sync.scm | 158 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 158 insertions(+)

diff --git a/gnu/packages/sync.scm b/gnu/packages/sync.scm
index d7c9009f3b..875af6da5a 100644
--- a/gnu/packages/sync.scm
+++ b/gnu/packages/sync.scm
@@ -30,6 +30,7 @@
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system go)
   #:use-module (guix build-system meson)
+  #:use-module (guix build-system qt)
   #:use-module (guix download)
   #:use-module (guix git-download)
   #:use-module (guix packages)
@@ -42,8 +43,11 @@
   #:use-module (gnu packages crypto)
   #:use-module (gnu packages curl)
   #:use-module (gnu packages documentation)
+  #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages glib)
+  #:use-module (gnu packages gnome)
   #:use-module (gnu packages golang)
+  #:use-module (gnu packages graphviz)
   #:use-module (gnu packages image)
   #:use-module (gnu packages kde-frameworks)
   #:use-module (gnu packages linux)
@@ -52,15 +56,169 @@
   #:use-module (gnu packages pcre)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages python)
+  #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages qt)
   #:use-module (gnu packages readline)
   #:use-module (gnu packages rsync)
+  #:use-module (gnu packages ruby)
   #:use-module (gnu packages selinux)
   #:use-module (gnu packages shells)
   #:use-module (gnu packages sphinx)
   #:use-module (gnu packages sqlite)
   #:use-module (gnu packages tls))
 
+(define-public nextcloud-client
+  (package
+    (name "nextcloud-client")
+    (version "3.1.3")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://github.com/nextcloud/desktop")
+         (commit
+          (string-append "v" version))))
+       (file-name
+        (git-file-name name version))
+       (sha256
+        (base32 "15ymk3gvfmgwzmqbhlw7jjy9y65ib3391h1dlmpll65iaj2miajk"))
+       (modules '((guix build utils)
+                  (ice-9 ftw)
+                  (srfi srfi-1)))
+       (snippet
+        `(begin
+           ;; Not available in Guix.
+           (let* ((keep '("QProgressIndicator" "qtokenizer")))
+             (with-directory-excursion "src/3rdparty"
+               (for-each delete-file-recursively
+                         (lset-difference string=?
+                                          (scandir ".")
+                                          (cons* "." ".." keep)))))
+           (with-directory-excursion "src/gui"
+             (substitute* "CMakeLists.txt"
+               ;; Remove references of deleted 3rdparties.
+               (("[ \t]*\\.\\./3rdparty/qtlockedfile/?.*\\.cpp")
+                "")
+               (("[ \t]*\\.\\./3rdparty/qtsingleapplication/?.*\\.cpp")
+                "")
+               (("[ \t]*\\.\\./3rdparty/kmessagewidget/?.*\\.cpp")
+                "")
+               (("[ \t]*list\\(APPEND 3rdparty_SRC \\.\\./3rdparty/?.*\\)")
+                "")
+               (("\\$\\{CMAKE_SOURCE_DIR\\}/src/3rdparty/qtlockedfile")
+                "")
+               (("\\$\\{CMAKE_SOURCE_DIR\\}/src/3rdparty/qtsingleapplication")
+                "")
+               ;; Patch include reference of KMessageWidget,
+               ;; to point to KWidgetsAddons, instead of 3rdparty.
+               (("\\$\\{CMAKE_SOURCE_DIR\\}/src/3rdparty/kmessagewidget")
+                "@kwidgetsaddons@/include/KF5/KWidgetsAddons/")
+               ;; Link libraries from inputs, that were deleted in 3rdparty,
+               ;; to wherever synclib gets linked.
+               (("\\$\\{synclib_NAME\\}")
+                (string-append "${synclib_NAME} "
+                               "QtSolutions_LockedFile "
+                               "QtSolutions_SingleApplication "
+                               "KF5WidgetsAddons")))
+             ;; Fix compatibility with QtSingleApplication from QtSolutions.
+             (substitute* '("application.h" "application.cpp")
+               (("SharedTools::QtSingleApplication")
+                "QtSingleApplication")
+               (("slotParseMessage\\(const QString &(msg)?.*\\)")
+                "slotParseMessage(const QString &msg)")))
+           #t))))
+    (build-system qt-build-system)
+    (arguments
+     `(#:configure-flags
+       (list
+        "-DUNIT_TESTING=ON"
+        ;; Upstream Bug: https://github.com/nextcloud/desktop/issues/2885
+        "-DNO_SHIBBOLETH=ON")
+       #: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))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-cmake
+           (lambda* (#:key outputs #:allow-other-keys)
+             ;; Patch install directory for dbus service files.
+             (substitute* "shell_integration/libcloudproviders/CMakeLists.txt"
+               (("PKGCONFIG_GETVAR\\(.+ _install_dir\\)")
+                (string-append "set(_install_dir \"${CMAKE_INSTALL_PREFIX}"
+                               "/share/dbus-1/services\")")))
+             ;; Make sure, that Qt modules are installed under $prefix.
+             (substitute* "shell_integration/dolphin/CMakeLists.txt"
+               (("ON CACHE")
+                "OFF CACHE"))
+             #t))
+         (add-before 'check 'pre-check
+           (lambda _
+             ;; 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)))))
+    (native-inputs
+     `(("cmocka" ,cmocka)
+       ("dot" ,graphviz)
+       ("doxygen" ,doxygen)
+       ("extra-cmake-modules" ,extra-cmake-modules)
+       ("glib:bin" ,glib "bin")
+       ("perl" ,perl)
+       ("pkg-config" ,pkg-config)
+       ("python" ,python-wrapper)
+       ("qttools" ,qttools)
+       ("ruby" ,ruby)))
+    (inputs
+     `(("appstream" ,appstream)
+       ("desktop-file-utils" ,desktop-file-utils)
+       ("glib" ,glib)
+       ("kconfig" ,kconfig)
+       ("kcoreaddons" ,kcoreaddons)
+       ("kio" ,kio)
+       ("kjs" ,kjs)
+       ("kwidgetsaddons" ,kwidgetsaddons)
+       ("libcloudproviders" ,libcloudproviders)
+       ("libzip" ,libzip)
+       ("openssl" ,openssl)
+       ("python-nautilus" ,python-nautilus)
+       ("qtbase" ,qtbase)
+       ("qtdeclarative" ,qtdeclarative)
+       ("qtgraphicaleffects" ,qtgraphicaleffects)
+       ("qtkeychain" ,qtkeychain)
+       ("qtquickcontrols2" ,qtquickcontrols2)
+       ("qtsolutions" ,qtsolutions)
+       ("qtsvg" ,qtsvg)
+       ("qtwebchannel" ,qtwebchannel)
+       ("qtwebsockets" ,qtwebsockets)
+       ("qtwebkit" ,qtwebkit)
+       ("sqlite" ,sqlite)
+       ("xdg-utils" ,xdg-utils)
+       ("zlib" ,zlib)))
+    (propagated-inputs
+     `(("qtwebengine" ,qtwebengine)))
+    (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/install/#install-clients")
+    (license
+     (list
+      ;; QtProgressIndicator
+      license:expat
+      ;; Qtokenizer
+      license:lgpl2.1+
+      ;; Others
+      license:gpl2+))))
+
 (define-public megacmd
   (package
     (name "megacmd")
-- 
2.30.1


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* bug#45889: Nextcloud Client (v18)
  2021-03-09 15:16                                               ` [bug#45889] Nextcloud Client (v18) Raghav Gururajan via Guix-patches via
@ 2021-03-09 23:24                                                 ` Leo Prikler
  2021-03-10  3:46                                                   ` [bug#45889] " Raghav Gururajan via Guix-patches via
  2021-03-12  9:25                                                   ` david larsson
  0 siblings, 2 replies; 44+ messages in thread
From: Leo Prikler @ 2021-03-09 23:24 UTC (permalink / raw)
  To: Raghav Gururajan, 45889-done

Am Dienstag, den 09.03.2021, 10:16 -0500 schrieb Raghav Gururajan:
> Hi Leo!
> 
> > The comment certainly improved FSVO improved, but it somehow does
> > not
> > reduce my bikeshedding mood.  In particular, I feel like we ought
> > to do
> > this in the snippet.
> 
> Moved to snippet.
> 
> > You just masked an install error without actually unvendoring
> > dependencies.
> 
> Done.
> 
> Please find the attached v18.
I've applied some cosmetic and less cosmetic changes, reviewed the
licenses and pushed nextcloud as
82a2f182c59cd9adef4991e0adfb575fec95e52d.

Regards,
Leo





^ permalink raw reply	[flat|nested] 44+ messages in thread

* [bug#45889] Nextcloud Client (v18)
  2021-03-09 23:24                                                 ` bug#45889: " Leo Prikler
@ 2021-03-10  3:46                                                   ` Raghav Gururajan via Guix-patches via
  2021-03-11  6:45                                                     ` Raghav Gururajan via Guix-patches via
  2021-03-12  9:25                                                   ` david larsson
  1 sibling, 1 reply; 44+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-03-10  3:46 UTC (permalink / raw)
  To: Leo Prikler, 45889-done


[-- Attachment #1.1: Type: text/plain, Size: 299 bytes --]

Hi Leo!

>> Please find the attached v18.
> I've applied some cosmetic and less cosmetic changes, reviewed the
> licenses and pushed nextcloud as
> 82a2f182c59cd9adef4991e0adfb575fec95e52d.

Thanks so much for helping me with every step of the way. I appreciate 
it. :-)

Regards,
RG.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

^ permalink raw reply	[flat|nested] 44+ messages in thread

* [bug#45889] Nextcloud Client (v18)
  2021-03-10  3:46                                                   ` [bug#45889] " Raghav Gururajan via Guix-patches via
@ 2021-03-11  6:45                                                     ` Raghav Gururajan via Guix-patches via
  2021-03-11  6:49                                                       ` Leo Prikler
  0 siblings, 1 reply; 44+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-03-11  6:45 UTC (permalink / raw)
  To: Leo Prikler, 45889


[-- Attachment #1.1.1: Type: text/plain, Size: 408 bytes --]

Hi Leo!

>>> Please find the attached v18.
>> I've applied some cosmetic and less cosmetic changes, reviewed the
>> licenses and pushed nextcloud as
>> 82a2f182c59cd9adef4991e0adfb575fec95e52d.
> 
> Thanks so much for helping me with every step of the way. I appreciate 
> it. :-)

I have named the package wrong. Could you please merge the attached 
patch please?

Thank you!

Regards,
RG.

[-- Attachment #1.1.2: 0001-gnu-Rename-nextcloud-client-to-nextcloud-desktop.patch --]
[-- Type: text/x-patch, Size: 868 bytes --]

From 587bda258971642915e19b7017d99b15c3ea7308 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <rg@raghavgururajan.name>
Date: Thu, 11 Mar 2021 01:39:49 -0500
Subject: [PATCH] gnu: Rename "nextcloud-client" to "nextcloud-desktop".

* gnu/packages/sync.scm (nextcloud-client): Rename to nextcloud-desktop.
---
 gnu/packages/sync.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/sync.scm b/gnu/packages/sync.scm
index 2b64117dc6..d8e0855e06 100644
--- a/gnu/packages/sync.scm
+++ b/gnu/packages/sync.scm
@@ -68,9 +68,9 @@
   #:use-module (gnu packages sqlite)
   #:use-module (gnu packages tls))
 
-(define-public nextcloud-client
+(define-public nextcloud-desktop
   (package
-    (name "nextcloud-client")
+    (name "nextcloud-desktop")
     (version "3.1.3")
     (source
      (origin
-- 
2.30.1


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [bug#45889] Nextcloud Client (v18)
  2021-03-11  6:45                                                     ` Raghav Gururajan via Guix-patches via
@ 2021-03-11  6:49                                                       ` Leo Prikler
  2021-03-11  7:44                                                         ` Raghav Gururajan via Guix-patches via
  0 siblings, 1 reply; 44+ messages in thread
From: Leo Prikler @ 2021-03-11  6:49 UTC (permalink / raw)
  To: Raghav Gururajan, 45889

Am Donnerstag, den 11.03.2021, 01:45 -0500 schrieb Raghav Gururajan:
> Hi Leo!
> 
> > > > Please find the attached v18.
> > > I've applied some cosmetic and less cosmetic changes, reviewed
> > > the
> > > licenses and pushed nextcloud as
> > > 82a2f182c59cd9adef4991e0adfb575fec95e52d.
> > 
> > Thanks so much for helping me with every step of the way. I
> > appreciate 
> > it. :-)
> 
> I have named the package wrong. Could you please merge the attached 
> patch please?
I don't see the name "nextcloud-client" as particularly problematic. 
It follows the same scheme as owncloud-client, which it is a fork of
IIUC.  What would be the reason to prefer nextcloud-desktop?

Regards,
Leo





^ permalink raw reply	[flat|nested] 44+ messages in thread

* [bug#45889] Nextcloud Client (v18)
  2021-03-11  6:49                                                       ` Leo Prikler
@ 2021-03-11  7:44                                                         ` Raghav Gururajan via Guix-patches via
  0 siblings, 0 replies; 44+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-03-11  7:44 UTC (permalink / raw)
  To: Leo Prikler, 45889


[-- Attachment #1.1: Type: text/plain, Size: 404 bytes --]

Hi Leo!

> I don't see the name "nextcloud-client" as particularly problematic.
> It follows the same scheme as owncloud-client, which it is a fork of
> IIUC.  What would be the reason to prefer nextcloud-desktop?

The upstream uses the name 'desktop' (nextcloud/desktop in contrast to 
owncloud/client).

Also, It will be distinct from nextcloud-cli, if we get one in guix.

Regards,
RG.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

^ permalink raw reply	[flat|nested] 44+ messages in thread

* [bug#45889] Nextcloud Client (v18)
  2021-03-09 23:24                                                 ` bug#45889: " Leo Prikler
  2021-03-10  3:46                                                   ` [bug#45889] " Raghav Gururajan via Guix-patches via
@ 2021-03-12  9:25                                                   ` david larsson
  2021-03-12  9:47                                                     ` Raghav Gururajan via Guix-patches via
  1 sibling, 1 reply; 44+ messages in thread
From: david larsson @ 2021-03-12  9:25 UTC (permalink / raw)
  To: 45889, leo.prikler, rg; +Cc: Guix-patches, 45889-done

On 2021-03-10 00:24, Leo Prikler wrote:
> Am Dienstag, den 09.03.2021, 10:16 -0500 schrieb Raghav Gururajan:
>> Hi Leo!
>> 
>> > The comment certainly improved FSVO improved, but it somehow does
>> > not
>> > reduce my bikeshedding mood.  In particular, I feel like we ought
>> > to do
>> > this in the snippet.
>> 
>> Moved to snippet.
>> 
>> > You just masked an install error without actually unvendoring
>> > dependencies.
>> 
>> Done.
>> 
>> Please find the attached v18.
> I've applied some cosmetic and less cosmetic changes, reviewed the
> licenses and pushed nextcloud as
> 82a2f182c59cd9adef4991e0adfb575fec95e52d.
> 
> Regards,
> Leo

This is great news! I have really been looking forward to this. Thank 
you both for almost 3 months of great work on this!

Best regards,
David




^ permalink raw reply	[flat|nested] 44+ messages in thread

* [bug#45889] Nextcloud Client (v18)
  2021-03-12  9:25                                                   ` david larsson
@ 2021-03-12  9:47                                                     ` Raghav Gururajan via Guix-patches via
  0 siblings, 0 replies; 44+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-03-12  9:47 UTC (permalink / raw)
  To: david larsson, 45889, leo.prikler; +Cc: Guix-patches, 45889-done


[-- Attachment #1.1: Type: text/plain, Size: 237 bytes --]

Hi David!

> This is great news! I have really been looking forward to this. Thank 
> you both for almost 3 months of great work on this!

:-)

It's in, https://guix.gnu.org/en/packages/nextcloud-client-3.1.3/

Regards,
RG.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

^ permalink raw reply	[flat|nested] 44+ messages in thread

end of thread, other threads:[~2021-03-12  9:49 UTC | newest]

Thread overview: 44+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-15 10:09 [bug#45889] Nextcloud Desktop Raghav Gururajan
2021-01-16  6:40 ` [bug#45889] Nextcloud Desktop (v2) Raghav Gururajan
2021-01-16  8:33 ` [bug#45889] Nextcloud Desktop (v3) Raghav Gururajan
2021-01-16 10:09 ` [bug#45889] Nextcloud Desktop (v4) Raghav Gururajan
2021-01-16 10:48   ` Nicolò Balzarotti
2021-01-16 14:42     ` Raghav Gururajan
2021-01-16 14:34 ` [bug#45889] Nextcloud Desktop (v5) Raghav Gururajan
2021-01-17 14:44 ` [bug#45889] Nextcloud Client (v6) Raghav Gururajan
2021-01-24 18:45   ` david larsson
2021-02-01 15:07     ` Raghav Gururajan
2021-02-01 15:13 ` [bug#45889] Nextcloud Client (v7) Raghav Gururajan
2021-02-09 10:22   ` Leo Prikler
2021-02-13 20:36     ` [bug#45889] Nextcloud Client (v8) Raghav Gururajan
2021-02-13 21:47       ` Leo Prikler
2021-02-13 23:54         ` Raghav Gururajan
2021-02-14  0:47           ` [bug#45889] Nextcloud Client (v9) Raghav Gururajan
2021-02-14 10:53           ` [bug#45889] Nextcloud Client (v8) Leo Prikler
2021-02-18 20:23             ` [bug#45889] Nextcloud Client (v10) Raghav Gururajan via Guix-patches via
2021-02-18 22:26               ` Leo Prikler
2021-02-21 17:04                 ` Raghav Gururajan via Guix-patches via
2021-02-21 17:45                   ` Leo Prikler
2021-02-21 18:09                     ` [bug#45889] Nextcloud Client (v11) Raghav Gururajan via Guix-patches via
2021-02-21 18:22                       ` Leo Prikler
2021-02-21 18:50                         ` [bug#45889] Nextcloud Client (v12) Raghav Gururajan via Guix-patches via
2021-02-21 19:37                           ` Leo Prikler
2021-02-22 17:29                             ` [bug#45889] Nextcloud Client (v13) Raghav Gururajan via Guix-patches via
2021-02-23 14:27                               ` [bug#45889] Nextcloud Client (v14) Raghav Gururajan via Guix-patches via
2021-02-23 17:58                                 ` Leo Prikler
2021-03-09  6:00                                   ` [bug#45889] Nextcloud Client (v15) Raghav Gururajan via Guix-patches via
2021-03-09  7:03                                     ` Leo Prikler
2021-03-09 10:50                                       ` [bug#45889] Nextcloud Client (v16) Raghav Gururajan via Guix-patches via
2021-03-09 11:39                                         ` Leo Prikler
2021-03-09 12:29                                           ` Raghav Gururajan via Guix-patches via
2021-03-09 12:43                                             ` [bug#45889] Nextcloud Client (v17) Leo Prikler
2021-03-09 15:16                                               ` [bug#45889] Nextcloud Client (v18) Raghav Gururajan via Guix-patches via
2021-03-09 23:24                                                 ` bug#45889: " Leo Prikler
2021-03-10  3:46                                                   ` [bug#45889] " Raghav Gururajan via Guix-patches via
2021-03-11  6:45                                                     ` Raghav Gururajan via Guix-patches via
2021-03-11  6:49                                                       ` Leo Prikler
2021-03-11  7:44                                                         ` Raghav Gururajan via Guix-patches via
2021-03-12  9:25                                                   ` david larsson
2021-03-12  9:47                                                     ` Raghav Gururajan via Guix-patches via
2021-02-21 18:22                       ` [bug#45889] Nextcloud Client (v11) Raghav Gururajan via Guix-patches via
2021-02-09 12:53   ` [bug#45889] Nextcloud Client (v7) Leo Prikler

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.