tests: Adjust for removal of 'device' field in <bootloader-configuration>.
[jackhill/guix/guix.git] / gnu / packages / pulseaudio.scm
index 846c174..7001a81 100644 (file)
@@ -6,6 +6,8 @@
 ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
 ;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
 ;;; Copyright © 2017 Stefan Reichör <stefan@xsteve.at>
+;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2018 Pierre Langlois <pierre.langlois@gmx.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
   #:use-module (guix download)
   #:use-module ((guix licenses) #:prefix l:)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system python)
   #:use-module (gnu packages)
   #:use-module (gnu packages algebra)
+  #:use-module (gnu packages audio)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages avahi)
   #:use-module (gnu packages check)
-  #:use-module (gnu packages databases)
+  #:use-module (gnu packages dbm)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages libcanberra)
@@ -52,7 +56,8 @@
                                  version ".tar.gz"))
              (patches (search-patches "libsndfile-armhf-type-checks.patch"
                                       "libsndfile-CVE-2017-8361-8363-8365.patch"
-                                      "libsndfile-CVE-2017-8362.patch"))
+                                      "libsndfile-CVE-2017-8362.patch"
+                                      "libsndfile-CVE-2017-12562.patch"))
              (sha256
               (base32
                "1afzm7jx34jhqn32clc5xghyjglccam2728yxlx37yj2y0lkkwqz"))))
@@ -119,7 +124,7 @@ rates.")
 (define-public pulseaudio
   (package
     (name "pulseaudio")
-    (version "10.0")
+    (version "12.2")
     (source (origin
              (method url-fetch)
              (uri (string-append
@@ -127,14 +132,16 @@ rates.")
                    name "-" version ".tar.xz"))
              (sha256
               (base32
-               "0mrg8qvpwm4ifarzphl3749p7p050kdx1l6mvsaj03czvqj6h653"))
+               "0ma0p8iry7fil7qb4pm2nx2pm65kq9hk9xc4r5wkf14nqbzni5l0"))
              (modules '((guix build utils)))
              (snippet
               ;; Disable console-kit support by default since it's deprecated
               ;; anyway.
-              '(substitute* "src/daemon/default.pa.in"
-                 (("load-module module-console-kit" all)
-                  (string-append "#" all "\n"))))
+              '(begin
+                 (substitute* "src/daemon/default.pa.in"
+                   (("load-module module-console-kit" all)
+                    (string-append "#" all "\n")))
+                 #t))
              (patches (search-patches
                        "pulseaudio-fix-mult-test.patch"
                        "pulseaudio-longer-test-timeout.patch"))))
@@ -146,35 +153,36 @@ rates.")
                                (string-append "--with-udev-rules-dir="
                                               (assoc-ref %outputs "out")
                                               "/lib/udev/rules.d"))
-       #:phases (alist-cons-before
-                 'check 'pre-check
-                 (lambda _
-                   ;; 'tests/lock-autospawn-test.c' wants to create a file
-                   ;; under ~/.config/pulse.
-                   (setenv "HOME" (getcwd))
-                   ;; 'thread-test' needs more time on hydra and on slower
-                   ;; machines, so we set the default timeout to 120 seconds.
-                   (setenv "CK_DEFAULT_TIMEOUT" "120"))
-                 %standard-phases)))
+       #:phases (modify-phases %standard-phases
+                 (add-before 'check 'pre-check
+                   (lambda _
+                     ;; 'tests/lock-autospawn-test.c' wants to create a file
+                     ;; under ~/.config/pulse.
+                     (setenv "HOME" (getcwd))
+                     ;; 'thread-test' needs more time on hydra and on slower
+                     ;; machines, so we set the default timeout to 120 seconds.
+                     (setenv "CK_DEFAULT_TIMEOUT" "120")
+                     #t)))))
     (inputs
      ;; TODO: Add optional inputs (GTK+?).
      `(("alsa-lib" ,alsa-lib)
        ("bluez" ,bluez)
        ("sbc" ,sbc)
-       ("speex" ,speex)
+       ("speexdsp" ,speexdsp)
        ("libsndfile" ,libsndfile)
-       ("libsamplerate" ,libsamplerate)
+       ("jack" ,jack-1) ; For routing the output to jack.
        ("dbus" ,dbus)
        ("glib" ,glib)
-       ("intltool" ,intltool)
-       ("m4" ,m4)
        ("libltdl" ,libltdl)
        ("fftwf" ,fftwf)
        ("avahi" ,avahi)
-       ("eudev" ,eudev)           ;for the detection of hardware audio devices
-       ("check" ,check)))
+       ("eudev" ,eudev)))         ;for the detection of hardware audio devices
     (native-inputs
-     `(("pkg-config" ,pkg-config)))
+     `(("check" ,check)
+       ("glib:bin" ,glib "bin")
+       ("intltool" ,intltool)
+       ("m4" ,m4)
+       ("pkg-config" ,pkg-config)))
     (propagated-inputs
      ;; 'libpulse*.la' contain `-lgdbm' and `-lcap', so propagate them.
      `(("libcap" ,libcap)
@@ -217,7 +225,7 @@ sound server.")
     (native-inputs
      `(("intltool" ,intltool)
        ("pkg-config" ,pkg-config)))
-    (home-page "http://freedesktop.org/software/pulseaudio/pavucontrol/")
+    (home-page "https://www.freedesktop.org/software/pulseaudio/pavucontrol/")
     (synopsis "PulseAudio volume control")
     (description
      "PulseAudio Volume Control (pavucontrol) provides a GTK+
@@ -259,3 +267,34 @@ easily control the volume of all clients, sinks, etc.")
 command-line interface.  In addition, it is possible to use named sources and
 sinks.")
     (license l:expat)))
+
+(define-public pulsemixer
+  (package
+    (name "pulsemixer")
+    (version "1.4.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/GeorgeFilipkin/"
+                                  "pulsemixer/archive/" version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1lpad90ifr2xfldyf39sbwx1v85rif2gm9w774gwwpjv53zfgk1g"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-path
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let ((pulse (assoc-ref inputs "pulseaudio")))
+               (substitute* "pulsemixer"
+                 (("libpulse.so.0")
+                  (string-append pulse "/lib/libpulse.so.0")))
+               #t))))))
+    (inputs
+     `(("pulseaudio" ,pulseaudio)))
+    (home-page "https://github.com/GeorgeFilipkin/pulsemixer/")
+    (synopsis "Command-line and curses mixer for PulseAudio")
+    (description "Pulsemixer is a PulseAudio mixer with command-line and
+curses-style interfaces.")
+    (license l:expat)))