Subject: [bug#76689] [PATCH gnome-team] gnu: Add cuttlefish.

From: Herman Rimm <[email-masked]>
Date: Sun, 2 Mar 2025 19:40:29 +0100

* gnu/packages/fediverse.scm (cuttlefish): Add variable.

Change-Id: I600f105862495a23e3d821b71b61582a442cb2f1
---
 gnu/packages/fediverse.scm | 59 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 59 insertions(+)

diff --git a/gnu/packages/fediverse.scm b/gnu/packages/fediverse.scm
index c660483b560..9d0d4fbc65c 100644
--- a/gnu/packages/fediverse.scm
+++ b/gnu/packages/fediverse.scm
@@ -48,10 +48,69 @@ (define-module (gnu packages fediverse)
   #:use-module (gnu packages python-crypto)
   #:use-module (gnu packages python-web)
   #:use-module (gnu packages python-xyz)
+  #:use-module (gnu packages serialization)
   #:use-module (gnu packages time)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages xml))
 
+(define-public cuttlefish
+  (package
+    (name "cuttlefish")
+    (version "0.1.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+              (url "https://gitlab.shinice.net/artectrex/Cuttlefish")
+              (commit "9e9b97ccbb27562c86637e5b413c28beacd8cd4d")))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0fdkag4j66zaf2shbw4j6hspk6bw6b0kbd5l6wzvh3p7id7yj6qi"))
+       (modules '((guix build utils)))
+       (snippet
+        #~(begin (substitute* "data/ch.cuttlefish.app.gschema.xml"
+                   ;; Instance does not work properly.
+                   (("https://video.blender.org")
+                    "https://tilvids.com"))
+                 (substitute* "src/video-view.cpp"
+                   ;; Top-level "files" key has an empty list.
+                   (("\\[\"files\"\\]")
+                    "[\"streamingPlaylists\"][0][\"files\"]"))))))
+    (build-system meson-build-system)
+    (arguments (list #:glib-or-gtk? #t
+          #:phases
+          #~(modify-phases %standard-phases
+              (add-after 'glib-or-gtk-wrap 'lib-vars-wrap
+                (lambda _
+                  (let ((gstvar "GST_PLUGIN_SYSTEM_PATH"))
+                    (wrap-program
+                      (string-append #$output "/bin/cuttlefish")
+                      `(,gstvar ":" suffix (,(getenv gstvar))))))))))
+    (native-inputs
+     (list desktop-file-utils
+           gettext-minimal ; msgfmt
+           (list glib "bin") ; glib-compile-resources
+           gsettings-desktop-schemas ; org.gnome.system.proxy schema
+           pkg-config))
+    (inputs (list gst-plugins-bad
+                  gst-plugins-good ; playbin plugin
+                  gstreamer
+                  gtk
+                  jsoncpp
+                  libadwaita
+                  libsoup-minimal-2))
+    (home-page "https://cuttlefish.ch")
+    (synopsis "GTK client for Peertube")
+    (description
+     "Cuttlefish is a desktop client for PeerTube, but will work on
+GNU/Linux-based phones (like the Librem 5 or Pinephone) as well.  We
+want the experience of watching PeerTube videos and using PeerTube in
+general to be better, by making a native application that will become
+the best and most efficient way to hook into the federation of
+interconnected video hosting services.")
+    ;; Logo distributed under the Creative Commons CCBY license.
+    (license license:gpl3+)))
+
 (define-public toot
   (package
     (name "toot")

base-commit: 7d977552742c6b8526079c3cac5610c883df52f1
-- 
2.48.1