Subject: [bug#65040] [PATCH] gnu: malcontent: Update to 0.11.1.

From: kiasoc5 <[email-masked]>
Date: Thu, 3 Aug 2023 11:30:24 -0400

* gnu/packages/freedesktop.scm (malcontent): Update to 0.11.1.
[inputs]: Remove appstream-glib and gtk+; add appstream, bash-minimal, gtk,
libadwaita, and python-pygobject.
[native-inputs]: Remove input labels.
[arguments]: Use G-expressions, remove trailing #t.
[phases]: Add phase to wrap malcontent-client with GI_TYPELIB_PATH.
---
 gnu/packages/freedesktop.scm | 55 +++++++++++++++++++++---------------
 1 file changed, 32 insertions(+), 23 deletions(-)

diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 112ae5afeb..bd1e2f34ee 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -338,7 +338,7 @@ (define-public libglib-testing
 (define-public malcontent
   (package
     (name "malcontent")
-    (version "0.8.0")
+    (version "0.11.1")
     (source
      (origin
        (method git-fetch)
@@ -347,37 +347,46 @@ (define-public malcontent
              (commit version)))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "0vnf0pk516fwwh41v96c29l2i7h1pnwhivlkbf53kkx1q35g7lb3"))))
+        (base32 "0g622ig5ffrzk9184xff3lardk7rnmkvj8y5g6h6s41bfh51b71m"))))
     (build-system meson-build-system)
     (arguments
-     `(#:glib-or-gtk? #t
-       #:phases
-       (modify-phases %standard-phases
-         ;; AppInfo not available inside build environment.
-         (add-after 'unpack 'fix-tests
-           (lambda _
-             (substitute* "libmalcontent/tests/app-filter.c"
-               (("g_test_add_func \\(\"/app-filter/appinfo\", test_app_filter_appinfo\\);")
-                 ""))
-             #t)))))
+     (list #:glib-or-gtk? #t
+           #:phases
+           #~(modify-phases %standard-phases
+               ;; AppInfo not available inside build environment.
+               (add-after 'unpack 'fix-tests
+                 (lambda _
+                   (substitute* "libmalcontent/tests/app-filter.c"
+                     (("g_test_add_func \\(\"/app-filter/appinfo\", test_app_filter_appinfo\\);")
+                      ""))))
+               (add-after 'install 'wrap-program
+                 (lambda _
+                   (wrap-program
+                       (string-append #$output "/bin/malcontent-client")
+                     `("GI_TYPELIB_PATH" ":" prefix
+                       (,(string-append #$output "/lib/girepository-1.0")
+                        ,(getenv "GI_TYPELIB_PATH")))))))))
     (native-inputs
-     `(("desktop-file-utils" ,desktop-file-utils)
-       ("gettext" ,gettext-minimal)
-       ("glib:bin" ,glib "bin")
-       ("gobject-introspection" ,gobject-introspection)
-       ("gtk+:bin" ,gtk+ "bin")
-       ("itstool" ,itstool)
-       ("libglib-testing" ,libglib-testing)
-       ("libxml2" ,libxml2)
-       ("pkg-config" ,pkg-config)))
+     (list desktop-file-utils
+           gettext-minimal
+           `(,glib "bin")
+           gobject-introspection
+           `(,gtk "bin")
+           itstool
+           libglib-testing
+           libxml2
+           pkg-config))
     (inputs
      (list accountsservice
-           appstream-glib
+           appstream
+           bash-minimal                 ; for wrap-program
            dbus
            flatpak
            glib
-           gtk+
+           gtk
+           libadwaita
            libostree
+           python-pygobject
            linux-pam
            polkit))
     (synopsis "Parental controls support")

base-commit: 782cf09b84bc72514e89d783460ea98bc353bf6a
-- 
2.39.2