Subject: [bug#67309] [PATCH gnome-team v4] gnu: Add gnome-connections.

From: Vivien Kraus <[email-masked]>
Date: Mon, 20 Nov 2023 20:25:45 +0100

* gnu/packages/gnome.scm (gnome-connections): New variable.

Change-Id: I4c026ab3aae07a73fcbc9b4b0612538455fe126a
* gnu/packages/patches/gnome-connections-disable-nonfree-desktop-page.patch:
New file.
* gnu/local.mk (dist_patch_DATA): Register it here.

Change-Id: If88a6e4c4f640a1175a8c98d13986f7520fe77b7
---
 gnu/local.mk                                  |  1 +
 gnu/packages/gnome.scm                        | 51 ++++++++++++++++++
 ...ections-disable-nonfree-desktop-page.patch | 52 +++++++++++++++++++
 3 files changed, 104 insertions(+)
 create mode 100644 gnu/packages/patches/gnome-connections-disable-nonfree-desktop-page.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 5cb9874d9f..6ae7e9b577 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1332,6 +1332,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/gnome-2048-fix-positional-argument.patch	\
   %D%/packages/patches/gnome-control-center-firmware-security.patch	\
   %D%/packages/patches/gnome-control-center-libexecdir.patch	\
+  %D%/packages/patches/gnome-connections-disable-nonfree-desktop-page.patch \
   %D%/packages/patches/gnome-dictionary-meson-i18n.patch	\
   %D%/packages/patches/gnome-online-miners-tracker-3.patch	\
   %D%/packages/patches/gnome-settings-daemon-gc.patch		\
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index d354327497..f2ed075172 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -13623,3 +13623,54 @@ (define-public calls
 backends, such as ModemManager for phones and @acronym{SIP, Session Initiation
 Protocol} for @acronym{VoIP, Voice over @acronym{IP, Internet Protocol}}.")
     (license license:gpl3+)))
+
+(define-public gnome-connections
+  (package
+    (name "gnome-connections")
+    (version "44.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://gnome/sources/" name "/"
+                                  (version-major version) "/"
+                                  name "-" version ".tar.xz"))
+              (sha256
+               (base32
+                "0sv238bq0dhi68ksr3bcl4q44i3ishk5i10c2325qz879f92sshk"))
+              (snippet
+               #~(begin
+                   (use-modules (guix build utils))
+                   (delete-file-recursively "subprojects")))
+              (patches
+               (search-patches "gnome-connections-disable-nonfree-desktop-page.patch"))))
+    (build-system meson-build-system)
+    (arguments
+     (list
+      #:glib-or-gtk? #t
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'patch-meson
+            (lambda _
+              (substitute* "meson.build"
+                (("gtk_update_icon_cache: true")
+                 "gtk_update_icon_cache: false")
+                (("update_desktop_database: true")
+                 "update_desktop_database: false"))))
+          (add-after 'unpack 'say-gnu/linux
+            (lambda _
+              (substitute* "src/ui/assistant.ui"
+                (("\\(standard for connecting to Linux\\)")
+                 "(standard for connecting to GNU/Linux)")))))))
+    (inputs
+     (list gtk+ gtk-frdp gtk-vnc libhandy libsecret libxml2))
+    (native-inputs
+     (list gettext-minimal
+           `(,glib "bin")
+           itstool
+           pkg-config
+           vala))
+    (home-page "https://apps.gnome.org/Connections")
+    (synopsis "View and use other desktops")
+    (description "Connections allows the user to connect to different
+real or virtual machines, using @acronym{VNC,Virtual Network Computing}
+or @acronym{RDP,Remote Desktop Protocol}.")
+    (license license:gpl3+)))
diff --git a/gnu/packages/patches/gnome-connections-disable-nonfree-desktop-page.patch b/gnu/packages/patches/gnome-connections-disable-nonfree-desktop-page.patch
new file mode 100644
index 0000000000..10ff421864
--- /dev/null
+++ b/gnu/packages/patches/gnome-connections-disable-nonfree-desktop-page.patch
@@ -0,0 +1,52 @@
+From d6841278e27ee560c080867ec128add9e1faab8c Mon Sep 17 00:00:00 2001
+Message-ID: <[email-masked]>
+From: Vivien Kraus <[email-masked]>
+Date: Sun, 26 Nov 2023 19:23:43 +0100
+Subject: [PATCH] =?UTF-8?q?Onboarding:=20Remove=20the=20=E2=80=9CDifferent?=
+ =?UTF-8?q?=20operating=20systems=E2=80=9D=20page.?=
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This page may be used to push users to use non-free software on a
+remote computer.
+---
+Discussion: https://gitlab.gnome.org/GNOME/connections/-/issues/144
+
+ src/ui/onboarding-dialog.ui         | 8 --------
+ src/ui/onboarding/multiplatform.svg | 1 -
+ 2 files changed, 9 deletions(-)
+ delete mode 100644 src/ui/onboarding/multiplatform.svg
+
+diff --git a/src/ui/onboarding-dialog.ui b/src/ui/onboarding-dialog.ui
+index 3ab8a1d..80d6a64 100644
+--- a/src/ui/onboarding-dialog.ui
++++ b/src/ui/onboarding-dialog.ui
+@@ -53,14 +53,6 @@
+                   </object>
+                 </child>
+ 
+-                <child>
+-                  <object class="ConnectionsOnboardingDialogPage">
+-                    <property name="title" translatable="yes">Connect to different operating systems</property>
+-                    <property name="description" translatable="yes">Access Linux, Mac, and Windows desktops using Connections.</property>
+-                    <property name="image">/org/gnome/Connections/ui/onboarding/multiplatform.svg</property>
+-                  </object>
+-                </child>
+-
+                 <child>
+                   <object class="ConnectionsOnboardingDialogPage">
+                     <property name="title" translatable="yes">Enable remote desktop before connecting</property>
+diff --git a/src/ui/onboarding/multiplatform.svg b/src/ui/onboarding/multiplatform.svg
+deleted file mode 100644
+index 5b3e6a1..0000000
+--- a/src/ui/onboarding/multiplatform.svg
++++ /dev/null
+@@ -1 +0,0 @@
+\ No newline at end of file
+
+base-commit: 5cc910bef66389c8f8122ee4a4a16661fe874e18
+-- 
+2.41.0
+

base-commit: e21f0cb7b7a87992004193cd56638ad961fe5928
-- 
2.41.0