[bug#70508] services: Add gvfs-service-type.
Commit Message
From: 宋文武 <iyzsong@member.fsf.org>
* gnu/services/desktop.scm (gvfs-service-type): New variable.
(gvfs-configuration, make-gvfs-configuration, gvfs-configuration?,
gvfs-package): New procedures.
(<gvfs-configuration>): New record.
* doc/guix.texi (Desktop Services): Document it.
Change-Id: I584819500e2ce7d2b14e57dac238a96e9888e75e
---
doc/guix.texi | 19 +++++++++++++++++++
gnu/services/desktop.scm | 28 ++++++++++++++++++++++++++++
2 files changed, 47 insertions(+)
base-commit: af4db17122d759705f3fd0ab03ef36c76ec90338
Comments
From Patch1:
> * gnu/packages/xfce.scm (thunar)[build-system]: Switch to glib-or-gtk-build-system.
>
From Patch2:
> * gnu/services/desktop.scm (gvfs-service-type): New variable.
> (gvfs-configuration, make-gvfs-configuration, gvfs-configuration?,
> gvfs-package): New procedures.
> (<gvfs-configuration>): New record.
> * doc/guix.texi (Desktop Services): Document it.
Both patches are needed technically, as GIO applications needed to be
wrapped with GIO_EXTRA_MODULES; and udisks, gvfs available as dbus
services. While it will still works with only Patch2, due to
gvfs-service-type also introduces GIO_EXTRA_MODULES via
gvfs-service-type -> udisks-service->type -> udisks -> glib dependencies
by chance, but on a foreign system or when the system side
libgvfsdbus.so is not ABI compatible with applicaiton's GLib, I guess
Patch1 could make application works as long as the GVfs dbus interface
is compatible.
宋文武 <iyzsong@envs.net> writes:
>>From Patch1:
>> * gnu/packages/xfce.scm (thunar)[build-system]: Switch to glib-or-gtk-build-system.
>>
>
>>From Patch2:
>> * gnu/services/desktop.scm (gvfs-service-type): New variable.
>> (gvfs-configuration, make-gvfs-configuration, gvfs-configuration?,
>> gvfs-package): New procedures.
>> (<gvfs-configuration>): New record.
>> * doc/guix.texi (Desktop Services): Document it.
Pushed to master as commits 1fbbdef3c9..3bd8d238ab, 'gvfs-service-type'
is not enabled by default due to its closure size (webkitgtk, samba, etc.)
@@ -24942,6 +24942,25 @@ Desktop Services
@end table
@end deftp
+@defvar gvfs-service-type
+Type for the service that provides virtual file systems for GIO
+applicaitons, which enables support for @code{trash:///}, @code{ftp://},
+@code{sftp://} and many other location schemas in file managers like
+Nautilus (GNOME Files) and Thunar.
+
+The value for this service is a @code{<gvfs-configuration>} object.
+@end defvar
+
+@deftp {Data Type} gvfs-configuration
+Data type representing the configuration for @code{gvfs-service-type}.
+
+@table @asis
+@item @code{gvfs} (default: @code{gvfs}) (type: file-like)
+Package object for GVfs.
+
+@end table
+@end deftp
+
@defvar colord-service-type
This is the type of the service that runs @command{colord}, a system
service with a D-Bus
@@ -109,6 +109,10 @@ (define-module (gnu services desktop)
udisks-service ; deprecated
udisks-service-type
+ gvfs-configuration
+ gvfs-configuration?
+ gvfs-service-type
+
colord-service-type
geoclue-application
@@ -989,6 +993,30 @@ (define-deprecated (udisks-service #:key (udisks udisks))
(service udisks-service-type
(udisks-configuration (udisks udisks))))
+
+
+;;;
+;;; GVfs virtual file system.
+;;;
+
+(define-record-type* <gvfs-configuration>
+ gvfs-configuration make-gvfs-configuration
+ gvfs-configuration?
+ (gvfs gvfs-package (default gvfs)))
+
+(define gvfs-service-type
+ (service-type (name 'gvfs)
+ (extensions
+ (list
+ (service-extension profile-service-type
+ (compose list gvfs-package))
+ ;; Required for gvfs-udisks2-volume-monitor.
+ (service-extension udisks-service-type (const #t))))
+ (description
+ "Make GVfs virtual file systems (Trash, SFTP, SMB, HTTP,
+and many other) available for GIO applications.")
+ (default-value (gvfs-configuration))))
+
;;;
;;; Elogind login and seat management service.