lilyp pushed a commit to branch gnome-team
in repository guix.

commit 93a2151ea0653c80b0db27a6f7ddebf7f2c6fd09
Author: Maxim Cournoyer <[email protected]>
AuthorDate: Mon Nov 11 15:16:45 2024 +0900

    gnu: gvfs: Patch mount, umount and lsof commands.
    
    * gnu/packages/gnome.scm (gvfs) [#:phases]: New argument.
    [inputs]: Add lsof and util-linux.
    
    Change-Id: If9c72e6de96f008be9decb4b7d89b0052c0f8f43
    Signed-off-by: Liliana Marie Prikler <[email protected]>
---
 gnu/packages/gnome.scm | 37 ++++++++++++++++++++++++++++---------
 1 file changed, 28 insertions(+), 9 deletions(-)

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 6137a145dc..b391052011 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -171,6 +171,7 @@
   #:use-module (gnu packages linux)
   #:use-module (gnu packages lirc)
   #:use-module (gnu packages llvm)
+  #:use-module (gnu packages lsof)
   #:use-module (gnu packages lua)
   #:use-module (gnu packages mail)
   #:use-module (gnu packages man)
@@ -7114,14 +7115,30 @@ part of udev-extras, then udev, then systemd.  It's now 
a project on its own.")
                 "0cgjlxrs4qr08igqjpkhfxpzydj8m9y9n92z091knkj5170x5bbj"))))
     (build-system meson-build-system)
     (arguments
-     (list #:glib-or-gtk? #t
-           #:configure-flags
-           #~(list "-Dsystemduserunitdir=no"
-                   "-Dtmpfilesdir=no"
-                   "-Dman=true"
-                   ;; Otherwise, the RUNPATH will lack the final path 
component.
-                   (string-append "-Dc_link_args=-Wl,-rpath="
-                                  #$output "/lib/gvfs"))))
+     (list
+      #:glib-or-gtk? #t
+      #:configure-flags
+      #~(list "-Dsystemduserunitdir=no"
+              "-Dtmpfilesdir=no"
+              "-Dman=true"
+              ;; Otherwise, the RUNPATH will lack the final path component.
+              (string-append "-Dc_link_args=-Wl,-rpath="
+                             #$output "/lib/gvfs"))
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'patch-commands
+            (lambda* (#:key inputs #:allow-other-keys)
+              (substitute* "monitor/udisks2/gvfsudisks2mount.c"
+                (("\"lsof -t")
+                 (string-append "\"" (search-input-file inputs "bin/lsof")
+                                " -t"))
+                (("\"umount %s")
+                 (string-append "\"" (search-input-file inputs "bin/umount")
+                                " %s")))
+              (substitute* "monitor/udisks2/gvfsudisks2volume.c"
+                (("\"mount \\\\\"%s")
+                 (string-append "\"" (search-input-file inputs "bin/mount")
+                                " \\\"%s"))))))))
     (native-inputs
      (list `(,glib "bin")               ;for glib-genmarshal, etc.
            gettext-minimal
@@ -7151,12 +7168,14 @@ part of udev-extras, then udev, then systemd.  It's now 
a project on its own.")
            libmtp
            libnfs
            libsecret
+           lsof
            samba
            libsoup
            libxml2
            openssh
            polkit
-           udisks))
+           udisks
+           util-linux))
     (home-page "https://wiki.gnome.org/Projects/gvfs";)
     (synopsis "Userspace virtual file system for GIO")
     (description

Reply via email to