You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

220 lines
8.4 KiB

  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org>
  3. ;;;
  4. ;;; This file is part of GNU Guix.
  5. ;;;
  6. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  7. ;;; under the terms of the GNU General Public License as published by
  8. ;;; the Free Software Foundation; either version 3 of the License, or (at
  9. ;;; your option) any later version.
  10. ;;;
  11. ;;; GNU Guix is distributed in the hope that it will be useful, but
  12. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  13. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. ;;; GNU General Public License for more details.
  15. ;;;
  16. ;;; You should have received a copy of the GNU General Public License
  17. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  18. (define-module (gnu packages pulseaudio)
  19. #:use-module (guix packages)
  20. #:use-module (guix download)
  21. #:use-module ((guix licenses)
  22. #:renamer (symbol-prefix-proc 'l:))
  23. #:use-module (guix build-system gnu)
  24. #:use-module (gnu packages)
  25. #:use-module (gnu packages linux)
  26. #:use-module (gnu packages oggvorbis)
  27. #:use-module (gnu packages pkg-config)
  28. #:use-module (gnu packages avahi)
  29. #:use-module (gnu packages glib)
  30. #:use-module (gnu packages gtk)
  31. #:use-module (gnu packages libcanberra)
  32. #:use-module (gnu packages algebra)
  33. #:use-module ((gnu packages autotools) #:select (libtool))
  34. #:use-module (gnu packages gdbm)
  35. #:use-module (gnu packages m4)
  36. #:use-module (gnu packages check)
  37. #:export (libsndfile
  38. libsamplerate
  39. json-c
  40. pulseaudio))
  41. (define libsndfile
  42. (package
  43. (name "libsndfile")
  44. (version "1.0.25")
  45. (source (origin
  46. (method url-fetch)
  47. (uri (string-append "http://www.mega-nerd.com/libsndfile/files/libsndfile-"
  48. version ".tar.gz"))
  49. (sha256
  50. (base32
  51. "10j8mbb65xkyl0kfy0hpzpmrp0jkr12c7mfycqipxgka6ayns0ar"))))
  52. (build-system gnu-build-system)
  53. (inputs
  54. `(("libvorbis" ,libvorbis)
  55. ("libogg" ,libogg)
  56. ("flac" ,flac)
  57. ("pkg-config" ,pkg-config)))
  58. (home-page "http://www.mega-nerd.com/libsndfile/")
  59. (synopsis "Reading and writing files containing sampled sound")
  60. (description
  61. "Libsndfile is a C library for reading and writing files containing
  62. sampled sound (such as MS Windows WAV and the Apple/SGI AIFF format) through
  63. one standard library interface.
  64. It was designed to handle both little-endian (such as WAV) and
  65. big-endian (such as AIFF) data, and to compile and run correctly on
  66. little-endian (such as Intel and DEC/Compaq Alpha) processor systems as well
  67. as big-endian processor systems such as Motorola 68k, Power PC, MIPS and
  68. SPARC. Hopefully the design of the library will also make it easy to extend
  69. for reading and writing new sound file formats.")
  70. (license l:gpl2+)))
  71. (define libsamplerate
  72. (package
  73. (name "libsamplerate") ; aka. Secret Rabbit Code (SRC)
  74. (version "0.1.8")
  75. (source (origin
  76. (method url-fetch)
  77. (uri (string-append "http://www.mega-nerd.com/SRC/libsamplerate-"
  78. version ".tar.gz"))
  79. (sha256
  80. (base32
  81. "01hw5xjbjavh412y63brcslj5hi9wdgkjd3h9csx5rnm8vglpdck"))))
  82. (build-system gnu-build-system)
  83. (inputs `(("pkg-config" ,pkg-config)))
  84. (propagated-inputs
  85. `(("libsndfile" ,libsndfile)
  86. ("fftw" ,fftw)))
  87. (home-page "http://www.mega-nerd.com/SRC/index.html")
  88. (synopsis "Audio sample rate conversion library")
  89. (description
  90. "Secret Rabbit Code (aka. libsamplerate) is a Sample Rate Converter for
  91. audio. One example of where such a thing would be useful is converting audio
  92. from the CD sample rate of 44.1kHz to the 48kHz sample rate used by DAT
  93. players.
  94. SRC is capable of arbitrary and time varying conversions; from downsampling by
  95. a factor of 256 to upsampling by the same factor. Arbitrary in this case means
  96. that the ratio of input and output sample rates can be an irrational
  97. number. The conversion ratio can also vary with time for speeding up and
  98. slowing down effects.
  99. SRC provides a small set of converters to allow quality to be traded off
  100. against computation cost. The current best converter provides a
  101. signal-to-noise ratio of 145dB with -3dB passband extending from DC to 96% of
  102. the theoretical best bandwidth for a given pair of input and output sample
  103. rates. ")
  104. (license l:gpl2+)))
  105. (define json-c
  106. (package
  107. (name "json-c")
  108. (version "0.11")
  109. (source (origin
  110. (method url-fetch)
  111. (uri (string-append "https://s3.amazonaws.com/json-c_releases/releases/json-c-"
  112. version ".tar.gz"))
  113. (sha256
  114. (base32
  115. "1324jja19jgsvcz9ij3nf4sgkrf4fg0ilw77vzqls3fw8m8wdpr8"))))
  116. (build-system gnu-build-system)
  117. (arguments '(#:parallel-build? #f
  118. #:parallel-tests? #f))
  119. (home-page "https://github.com/json-c/json-c/wiki")
  120. (synopsis "JSON implementation in C")
  121. (description
  122. "JSON-C implements a reference counting object model that allows you to
  123. easily construct JSON objects in C, output them as JSON formatted strings and
  124. parse JSON formatted strings back into the C representation of JSON objects.")
  125. (license l:x11)))
  126. (define pulseaudio
  127. (package
  128. (name "pulseaudio")
  129. (version "4.0")
  130. (source (origin
  131. (method url-fetch)
  132. (uri (string-append
  133. "http://freedesktop.org/software/pulseaudio/releases/pulseaudio-"
  134. version ".tar.xz"))
  135. (sha256
  136. (base32
  137. "1bndz4l8jxyq3zq128gzp3gryxl6yjs66j2y1d7yabw2n5mv7kim"))
  138. (patches (list (search-patch "pulseaudio-test-timeouts.patch")))))
  139. (build-system gnu-build-system)
  140. (arguments
  141. '(#:configure-flags '("--localstatedir=/var" ;"--sysconfdir=/etc"
  142. "--disable-oss-output")
  143. #:phases (alist-cons-before
  144. 'check 'pre-check
  145. (lambda _
  146. ;; 'tests/lock-autospawn-test.c' wants to create a file
  147. ;; under ~/.config/pulse.
  148. (setenv "HOME" (getcwd)))
  149. %standard-phases)))
  150. (inputs
  151. ;; TODO: Add optional inputs (GTK+?).
  152. `(;; ("sbc" ,sbc)
  153. ("alsa-lib" ,alsa-lib)
  154. ("json-c" ,json-c)
  155. ("speex" ,speex)
  156. ("libsndfile" ,libsndfile)
  157. ("libsamplerate" ,libsamplerate)
  158. ("dbus" ,dbus)
  159. ("glib" ,glib)
  160. ("intltool" ,intltool)
  161. ("pkg-config" ,pkg-config)
  162. ("m4" ,m4)
  163. ("libtool" ,libtool)
  164. ("fftw" ,fftw)
  165. ("avahi" ,avahi)
  166. ("check" ,check)))
  167. (propagated-inputs
  168. ;; 'libpulse*.la' contain `-lgdbm' and `-lcap', so propagate them.
  169. `(("libcap" ,libcap)
  170. ("gdbm" ,gdbm)))
  171. (home-page "http://www.pulseaudio.org/")
  172. (synopsis "Sound server")
  173. (description
  174. "PulseAudio is a sound server. It is basically a proxy for your sound applications.
  175. It allows you to do advanced operations on your sound data as it passes
  176. between your application and your hardware. Things like transferring the
  177. audio to a different machine, changing the sample format or channel count and
  178. mixing several sounds into one are easily achieved using a sound server. ")
  179. ;; PulseAudio is LGPLv2+, but some of the optional dependencies (GNU dbm,
  180. ;; FFTW, etc.) are GPL'd, so the result is effectively GPLv2+. See
  181. ;; 'LICENSE' for details.
  182. (license l:gpl2+)))
  183. (define-public pavucontrol
  184. (package
  185. (name "pavucontrol")
  186. (version "2.0")
  187. (source (origin
  188. (method url-fetch)
  189. (uri (string-append
  190. "http://freedesktop.org/software/pulseaudio/pavucontrol/pavucontrol-"
  191. version
  192. ".tar.xz"))
  193. (sha256
  194. (base32
  195. "02s775m1531sshwlbvfddk3pz8zjmwkv1sgzggn386ja3gc9vwi2"))))
  196. (build-system gnu-build-system)
  197. (inputs
  198. `(("intltool" ,intltool)
  199. ("libcanberra" ,libcanberra)
  200. ("gtkmm" ,gtkmm)
  201. ("pulseaudio" ,pulseaudio)
  202. ("pkg-config" ,pkg-config)))
  203. (home-page "http://freedesktop.org/software/pulseaudio/pavucontrol/")
  204. (synopsis "PulseAudio volume control")
  205. (description
  206. "PulseAudio Volume Control (pavucontrol) provides a GTK+
  207. graphical user interface to connect to a PulseAudio server and
  208. easily control the volume of all clients, sinks, etc.")
  209. (license l:gpl2+)))