Subject: [PATCH] gnu: dunst: Build dunstify.

From: Brice Waegeneire <[email-masked]>
Date: Sun, 9 Feb 2020 10:11:09 +0100

* gnu/packages/dunst.scm (dunst)[arguments]: Add phase install-dunstify.
[inputs]: Add libnotify.
---
 gnu/packages/dunst.scm | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/dunst.scm b/gnu/packages/dunst.scm
index 75f2b80e5f..ecb6c15e16 100644
--- a/gnu/packages/dunst.scm
+++ b/gnu/packages/dunst.scm
@@ -26,6 +26,7 @@
   #:use-module (gnu packages base)
   #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages glib)
+  #:use-module (gnu packages gnome)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
@@ -52,9 +53,15 @@
                           ;; Otherwise it tries to install service file
                           ;; to "dbus" store directory.
                           (string-append "SERVICEDIR_DBUS=" %output
-                                         "/share/dbus-1/services"))
+                                         "/share/dbus-1/services")
+                          "dunstify")
        #:phases (modify-phases %standard-phases
-                  (delete 'configure))))
+                  (delete 'configure)
+                  (add-after 'install 'install-dunstify
+                    (lambda* (#:key outputs #:allow-other-keys)
+                      (let ((out (assoc-ref outputs "out")))
+                        (copy-file "dunstify"
+                                   (string-append out "/bin/dunstify"))))))))
     (native-inputs
      `(("pkg-config" ,pkg-config)
        ("perl" ,perl)                   ; for pod2man
@@ -65,6 +72,7 @@
        ("glib" ,glib)
        ("cairo" ,cairo)
        ("pango" ,pango)
+       ("libnotify" ,libnotify)         ; for dunstify
        ("libx11" ,libx11)
        ("libxscrnsaver" ,libxscrnsaver)
        ("libxinerama" ,libxinerama)
-- 
2.24.1