[bug#76324,3/6] gnu: sync: add seafile-client

Message ID 3adb887c065cea90b9773f9f1da858932b2dfac5.1739648316.git.flypaper@disroot.org
State New
Headers
Series Add seafile-client, seadrive-fuse, seadrive-client and dependencies |

Commit Message

flypaper Feb. 16, 2025, 9:38 a.m. UTC
  * gnu/packages/sync.scm (seafile-client): New package.

Change-Id: I57b8ed9c0b1edf61283d3cc1276a64660e74ed8a
---
 gnu/packages/sync.scm | 62 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 62 insertions(+)
  

Patch

diff --git a/gnu/packages/sync.scm b/gnu/packages/sync.scm
index d65f1db018..391ed57e0c 100644
--- a/gnu/packages/sync.scm
+++ b/gnu/packages/sync.scm
@@ -62,6 +62,7 @@  (define-module (gnu packages sync)
   #: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)
@@ -692,3 +693,64 @@  (define-public seafile
                          libtool
                          pkg-config))))
 
+(define-public seafile-client
+  (package
+    (name "seafile-client")
+    (version "9.0.9")
+    (home-page "https://github.com/haiwen/seafile-client")
+    (license license:asl2.0)
+    (build-system qt-build-system)
+    (inputs (list sqlite
+                  gtk
+                  curl
+                  util-linux
+                  openssl
+                  jansson
+                  libevent
+                  libwebsockets
+                  libsearpc
+                  seafile
+                  python
+                  qttools
+                  python-simplejson
+                  qtwebengine
+                  qt5compat))
+    (arguments
+     (list
+      #:qtbase qtbase
+      #:tests? ;cmakefile only has tests for qt5
+      #f
+      #:phases '(modify-phases %standard-phases
+                  ;; seafile-client expects seaf-daemon in %PATH
+                  ;; but we can just replace it in the source with a path to store
+                  ;; so that we dont anymore.
+                  (add-after 'unpack 'replace-daemon-executable
+                    (lambda* (#:key inputs #:allow-other-keys)
+                      (substitute* "src/daemon-mgr.cpp"
+                        (("seaf-daemon" all)
+                         (search-input-file inputs
+                                            (string-append "bin/" all)))))))
+
+      #:configure-flags '(list "-DBUILD_DOCS=ON"
+                               "-DBUILD_SHIBBOLETH_SUPPORT=ON"
+                               "-DCMAKE_BUILD_TYPE=Release")))
+    (native-inputs (list autoconf
+                         automake
+                         libtool
+                         pkg-config
+                         vala
+                         intltool
+                         cmake-minimal))
+    (synopsis "Seafile GUI desktop client")
+    (description
+     "The Graphical desktop client that is used to connect to Seafile servers")
+    (source
+     (origin
+       (method git-fetch)
+       (file-name (git-file-name name version))
+       (uri (git-reference
+             (url home-page)
+             (commit (string-append "v" version))))
+       (sha256
+        (base32 "1hivlwbpkj4j42s49z0fj0xp1wyxr67nl6sqy1ydbiij65f48bkp"))))))
+