gnu: ruby-pandoc-ruby: Use pandoc instead of ghc-pandoc.
[jackhill/guix/guix.git] / gnu / packages / libcanberra.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
3 ;;; Copyright © 2014, 2015, 2019 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2016 Fabian Harfert <fhmgufs@web.de>
5 ;;; Copyright © 2017, 2018 Nikita <nikita@n0.is>
6 ;;;
7 ;;; This file is part of GNU Guix.
8 ;;;
9 ;;; GNU Guix is free software; you can redistribute it and/or modify it
10 ;;; under the terms of the GNU General Public License as published by
11 ;;; the Free Software Foundation; either version 3 of the License, or (at
12 ;;; your option) any later version.
13 ;;;
14 ;;; GNU Guix is distributed in the hope that it will be useful, but
15 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ;;; GNU General Public License for more details.
18 ;;;
19 ;;; You should have received a copy of the GNU General Public License
20 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
21
22 (define-module (gnu packages libcanberra)
23 #:use-module ((guix licenses)
24 #:select (lgpl2.1+ gpl2 gpl2+ cc-by-sa4.0 cc-by3.0))
25 #:use-module (gnu packages)
26 #:use-module (guix packages)
27 #:use-module (guix download)
28 #:use-module (guix git-download)
29 #:use-module (guix build-system gnu)
30 #:use-module (guix build-system python)
31 #:use-module (guix utils)
32 #:use-module (gnu packages autotools)
33 #:use-module (gnu packages gstreamer)
34 #:use-module (gnu packages gtk)
35 #:use-module (gnu packages glib)
36 #:use-module (gnu packages linux)
37 #:use-module (gnu packages pulseaudio)
38 #:use-module (gnu packages pkg-config)
39 #:use-module (gnu packages python)
40 #:use-module (gnu packages xiph)
41 #:use-module ((srfi srfi-1) #:select (alist-delete)))
42
43 (define-public libcanberra
44 (package
45 (name "libcanberra")
46 (version "0.30")
47 (source
48 (origin
49 (method url-fetch)
50
51 ;; This used to be at 0pointer.de but it vanished.
52 (uri (string-append
53 "http://pkgs.fedoraproject.org/repo/pkgs/libcanberra/libcanberra-"
54 version ".tar.xz/34cb7e4430afaf6f447c4ebdb9b42072/libcanberra-"
55 version ".tar.xz"))
56 (sha256
57 (base32
58 "0wps39h8rx2b00vyvkia5j40fkak3dpipp1kzilqla0cgvk73dn2"))
59 ;; "sound-theme-freedesktop" is the default and fall-back sound theme for
60 ;; XDG desktops and should always be present.
61 ;; http://www.freedesktop.org/wiki/Specifications/sound-theme-spec/
62 ;; We make sure libcanberra will find it.
63 ;;
64 ;; We add the default sounds store directory to the code dealing with
65 ;; XDG_DATA_DIRS and not XDG_DATA_HOME. This is because XDG_DATA_HOME
66 ;; can only be a single directory and is inspected first. XDG_DATA_DIRS
67 ;; can list an arbitrary number of directories and is only inspected
68 ;; later. This is designed to allows the user to modify any theme at
69 ;; his pleasure.
70 (patch-flags '("-p0"))
71 (patches
72 (search-patches "libcanberra-sound-theme-freedesktop.patch"))))
73 (build-system gnu-build-system)
74 (inputs
75 `(("alsa-lib" ,alsa-lib)
76 ("gstreamer" ,gstreamer)
77 ("gtk+" ,gtk+)
78 ("libltdl" ,libltdl)
79 ("libvorbis" ,libvorbis)
80 ("pulseaudio" ,pulseaudio)
81 ("udev" ,eudev)
82 ("sound-theme-freedesktop" ,sound-theme-freedesktop)))
83 (native-inputs
84 `(("pkg-config" ,pkg-config)))
85 (arguments
86 `(#:phases
87 (modify-phases %standard-phases
88 (add-before 'build 'patch-default-sounds-directory
89 (lambda* (#:key inputs #:allow-other-keys)
90 (substitute* "src/sound-theme-spec.c"
91 (("@SOUND_THEME_DIRECTORY@")
92 (string-append
93 (assoc-ref inputs "sound-theme-freedesktop")
94 "/share")))
95 #t)))))
96 (home-page "http://0pointer.de/lennart/projects/libcanberra/")
97 (synopsis
98 "Implementation of the XDG Sound Theme and Name Specifications")
99 (description
100 "Libcanberra is an implementation of the XDG Sound Theme and Name
101 Specifications, for generating event sounds on free desktops, such as
102 GNOME. It comes with several backends (ALSA, PulseAudio, OSS, GStreamer,
103 null) and is designed to be portable.")
104 (license lgpl2.1+)))
105
106 (define-public libcanberra/gtk+-2
107 (package (inherit libcanberra)
108 (name "libcanberra-gtk2")
109 (inputs `(,@(alist-delete "gtk+" (package-inputs libcanberra))
110 ("gtk+" ,gtk+-2)))))
111
112 (define-public sound-theme-freedesktop
113 (package
114 (name "sound-theme-freedesktop")
115 (version "0.8")
116 (source (origin
117 (method url-fetch)
118 (uri (string-append "https://people.freedesktop.org/~mccann/dist/"
119 name "-" version ".tar.bz2"))
120 (sha256
121 (base32
122 "054abv4gmfk9maw93fis0bf605rc56dah7ys5plc4pphxqh8nlfb"))))
123 (build-system gnu-build-system)
124 (native-inputs `(("intltool" ,intltool)))
125 (synopsis "Audio samples for use as a desktop sound theme")
126 (description
127 "This package provides audio samples that can be used by libcanberra as
128 sounds for various system events.")
129
130 ;; The license of the various sounds is given in the 'CREDITS' file.
131 (license (list cc-by-sa4.0 cc-by3.0 gpl2 gpl2+))
132
133 (home-page "https://www.freedesktop.org/wiki/Specifications/sound-theme-spec/")))
134
135 (define-public python-pycanberra
136 (package
137 (name "python-pycanberra")
138 (version "0.1.1")
139 (source
140 (origin
141 (method url-fetch)
142 (uri (string-append "http://ftp.n0.is/pub/releases/"
143 "pycanberra-" version ".tar.xz"))
144 (sha256
145 (base32
146 "16jjf8fcgaprmz6jacsxrh17l1ad891fns38bxv49lg3s3mn1nj2"))))
147 (build-system python-build-system)
148 (arguments
149 `(#:tests? #f)) ;No tests included.
150 (propagated-inputs
151 `(("libcanberra" ,libcanberra)))
152 (synopsis "Ctypes wrapper for the libcanberra API")
153 (description
154 "Pycanberra is a basic Python wrapper for libcanberra.")
155 (home-page "http://c.n0.is/ng0/pycanberra/")
156 (license lgpl2.1+)))