Subject: Re: [bug#39422] [PATCH] gnu: Add pasystray.

From: Amin Bandali <[email-masked]>
Date: Tue, 04 Feb 2020 20:36:05 -0500

Leo Famulari <[email-masked]> writes:

> On Tue, Feb 04, 2020 at 10:31:23AM -0500, Amin Bandali wrote:
>> * gnu/packages/gtk.scm (pasystray): New variable.
>
> Thanks! Can we put it in the pulseaudio module?
>

Sure!  Noting that now there's a circular import between the pulseaudio
module and the gnome module because of dependency of pasystray on
libnotify, defined in the gnome module.

>
>> +         (add-before 'bootstrap 'remove-bootstrap.sh
>> +           (lambda _
>> +             (delete-file "bootstrap.sh") ; not useful in the context of Guix
>> +             #t)))))
>
> Also, can you clarify this comment? Like, does it interfere with
> building?
>

Yeah, exactly:

--8<---------------cut here---------------start------------->8---
...
starting phase `bootstrap'
running './bootstrap.sh'
patch-shebang: ./bootstrap.sh: changing `/usr/bin/env bash' to `/gnu/store/29jhbbg1hf557x8j53f9sxd9imlmf02a-bash-minimal-5.0.7/bin/bash'
configure.ac:27: installing './compile'
configure.ac:26: installing './install-sh'
configure.ac:26: installing './missing'
src/Makefile.am: installing './depcomp'
./bootstrap.sh: ./configure: /bin/sh: bad interpreter: No such file or directory
command "./bootstrap.sh" failed with status 126
--8<---------------cut here---------------end--------------->8---

PATCH v2 below mentions that bootstrap.sh interferes with build.
Is that better?  Or were you thinking of a longer explanation?

                                 * * *

From 025f5eea0fb0508d0306d3c476b3c47c4fc9273c Mon Sep 17 00:00:00 2001
From: Amin Bandali <[email-masked]>
Date: Tue, 4 Feb 2020 20:31:49 -0500
Subject: [PATCH v2] gnu: Add pasystray.

* gnu/packages/pulseaudio.scm (pasystray): New variable.
---
 gnu/packages/pulseaudio.scm | 40 +++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/gnu/packages/pulseaudio.scm b/gnu/packages/pulseaudio.scm
index 2bbe6c5bdd..0e37fe4f48 100644
--- a/gnu/packages/pulseaudio.scm
+++ b/gnu/packages/pulseaudio.scm
@@ -42,6 +42,7 @@
   #:use-module (gnu packages check)
   #:use-module (gnu packages dbm)
   #:use-module (gnu packages glib)
+  #:use-module (gnu packages gnome)     ; for libnotify
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages libcanberra)
   #:use-module (gnu packages web)
@@ -402,3 +403,42 @@ install one or more of the following packages alongside pulseaudio-dlna:
      "pamixer is like amixer but for PulseAudio, allowing easy control of the
 volume levels of the sinks (get, set, decrease, increase, toggle mute, etc).")
     (license l:gpl3+)))
+
+(define-public pasystray
+  (package
+    (name "pasystray")
+    (version "0.7.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/christophgysin/pasystray.git")
+             (commit (string-append name "-" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0xx1bm9kimgq11a359ikabdndqg5q54pn1d1dyyjnrj0s41168fk"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'bootstrap 'remove-bootstrap.sh
+           (lambda _
+             (delete-file "bootstrap.sh") ; not useful in the context of Guix,
+                                          ; and interferes with build
+             #t)))))
+    (native-inputs
+     `(("autoconf" ,autoconf)
+       ("automake" ,automake)           ; for aclocal
+       ("pkg-config" ,pkg-config)))
+    (inputs
+     `(("avahi" ,avahi)
+       ("gtk+" ,gtk+)
+       ("libnotify" ,libnotify)
+       ("libx11" ,libx11)
+       ("pulseaudio" ,pulseaudio)))
+    (home-page "https://github.com/christophgysin/pasystray")
+    (synopsis "PulseAudio controller for the system tray")
+    (description "@command{pasystray} enables control of various
+PulseAudio server settings from the X11 system tray.  See the project
+README.md for a detailed list of features.")
+    (license l:lgpl2.1+)))
-- 
2.25.0