diff mbox series

[bug#48027] gnu: Add volctl.

Message ID yguv989mptv.fsf@netpanic.org
State Accepted
Headers show
Series [bug#48027] gnu: Add volctl. | expand

Checks

Context Check Description
cbaines/submitting builds success
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Simon Streit April 26, 2021, 7 a.m. UTC
* gnu/packages/gtk.scm: New Variable.
---
 gnu/packages/gtk.scm | 46 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)

Comments

Ludovic Courtès May 3, 2021, 9:09 p.m. UTC | #1
Hi Simon,

Simon Streit <simon@netpanic.org> skribis:

> * gnu/packages/gtk.scm: New Variable.

[...]

> +    (source (origin
> +              (method url-fetch)
> +              (uri (string-append "https://github.com/buzz/" name
> +                                  "/archive/v" version ".tar.gz"))
> +              (sha256
> +               (base32
> +                "1xanqn6s2i6s2n6wysvgz6l58lsdkl3zmzz4hccla01gx7h4yx4f"))))

To placate ‘guix lint’, could you (1) use ‘git-fetch’ instead of
referring to an autogenerated tarball, and (2) add a ‘file-name’ field
as done elsewhere?

> +    (arguments
> +     `(#:tests? #t

You can remove this line, it’s the default.

> +    (synopsis "Per-application volume control and OSD for Linux desktops")
> +    (description "Volctl is a PulseAudio-enabled tray icon volume control and
> +OSD applet for Linux desktops.  It's not meant to be an replacement for a

I’d suggest:

  s/OSD/on-screen display (OSD)/
  s/Linux desktops/graphical desktops/

Could you send an updated patch?

Thank you,
Ludo’.
diff mbox series

Patch

diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 542e274ce3..b4b7dbb785 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -26,6 +26,7 @@ 
 ;;; Copyright © 2020 Guillaume Le Vaillant <glv@posteo.net>
 ;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;; Copyright © 2021 Leo Famulari <leo@famulari.name>
+;;; Copyright © 2021 Simon Streit <simon@netpanic.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -90,6 +91,7 @@ 
   #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg)
   #:use-module (gnu packages xdisorg)
+  #:use-module (gnu packages pulseaudio)
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-26)
   #:use-module (ice-9 match))
@@ -2371,3 +2373,47 @@  linear or logarithmic scales, as dots or lines, with markers/labels) as well as
 user interaction (e.g.  measuring distances).")
     (home-page "https://sourceforge.net/projects/gtkdatabox/")
     (license license:lgpl2.1+)))
+
+(define-public volctl
+  (package
+    (name "volctl")
+    (version "0.8.2")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/buzz/" name
+                                  "/archive/v" version ".tar.gz"))
+              (sha256
+               (base32
+                "1xanqn6s2i6s2n6wysvgz6l58lsdkl3zmzz4hccla01gx7h4yx4f"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:tests? #t
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-path
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let ((pulse (assoc-ref inputs "pulseaudio"))
+                   (xfixes (assoc-ref inputs "libxfixes")))
+               (substitute* "volctl/lib/xwrappers.py"
+                 (("libXfixes.so")
+                  (string-append xfixes "/lib/libXfixes.so")))
+               (substitute* "volctl/lib/pulseaudio.py"
+                 (("libpulse.so.0")
+                  (string-append pulse "/lib/libpulse.so.0")))
+               #t))))))
+    (inputs
+     `(("gtk+" ,gtk+)
+       ("libxfixes" ,libxfixes)
+       ("pulseaudio" ,pulseaudio)))
+    (propagated-inputs
+     `(("python-click" ,python-click)
+       ("python-pycairo" ,python-pycairo)
+       ("python-pygobject" ,python-pygobject)
+       ("python-pyyaml" ,python-pyyaml)))
+    (home-page "https://buzz.github.io/volctl/")
+    (synopsis "Per-application volume control and OSD for Linux desktops")
+    (description "Volctl is a PulseAudio-enabled tray icon volume control and
+OSD applet for Linux desktops.  It's not meant to be an replacement for a
+full-featured mixer application.  If you're looking for that check out the
+excellent pavucontrol.")
+    (license license:gpl2)))