projects/guix·blob ruby-team · refs

146 lines · 5.7 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Andreas Enge <[email protected]>
3;;; Copyright © 2014, 2015, 2019 Ludovic Courtès <[email protected]>
4;;; Copyright © 2016 Fabian Harfert <[email protected]>
5;;; Copyright © 2017, 2018 Nikita <[email protected]>
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 build-system gnu)
29 #:use-module (guix build-system pyproject)
30 #:use-module (gnu packages autotools)
31 #:use-module (gnu packages gstreamer)
32 #:use-module (gnu packages gtk)
33 #:use-module (gnu packages glib)
34 #:use-module (gnu packages linux)
35 #:use-module (gnu packages pulseaudio)
36 #:use-module (gnu packages pkg-config)
37 #:use-module (gnu packages python-build)
38 #:use-module (gnu packages xiph))
39
40(define-public libcanberra
41 (package
42 (name "libcanberra")
43 (version "0.30")
44 (source
45 (origin
46 (method url-fetch)
47
48 ;; This used to be at 0pointer.de but it vanished.
49 (uri (string-append
50 "http://pkgs.fedoraproject.org/repo/pkgs/libcanberra/libcanberra-"
51 version ".tar.xz/34cb7e4430afaf6f447c4ebdb9b42072/libcanberra-"
52 version ".tar.xz"))
53 (sha256
54 (base32
55 "0wps39h8rx2b00vyvkia5j40fkak3dpipp1kzilqla0cgvk73dn2"))
56 ;; "sound-theme-freedesktop" is the default and fall-back sound theme for
57 ;; XDG desktops and should always be present.
58 ;; http://www.freedesktop.org/wiki/Specifications/sound-theme-spec/
59 ;; We make sure libcanberra will find it.
60 ;;
61 ;; We add the default sounds store directory to the code dealing with
62 ;; XDG_DATA_DIRS and not XDG_DATA_HOME. This is because XDG_DATA_HOME
63 ;; can only be a single directory and is inspected first. XDG_DATA_DIRS
64 ;; can list an arbitrary number of directories and is only inspected
65 ;; later. This is designed to allows the user to modify any theme at
66 ;; his pleasure.
67 (patch-flags '("-p0"))
68 (patches
69 (search-patches "libcanberra-sound-theme-freedesktop.patch"
70 "libcanberra-wayland-crash.patch"))))
71 (build-system gnu-build-system)
72 (arguments
73 `(#:phases
74 (modify-phases %standard-phases
75 (add-before 'build 'patch-default-sounds-directory
76 (lambda* (#:key inputs #:allow-other-keys)
77 (substitute* "src/sound-theme-spec.c"
78 (("@SOUND_THEME_DIRECTORY@")
79 (dirname
80 (dirname
81 (search-input-directory inputs
82 "share/sounds/freedesktop"))))))))))
83 (inputs
84 (list alsa-lib
85 gstreamer
86 gtk+
87 libltdl
88 libvorbis
89 pulseaudio
90 eudev
91 sound-theme-freedesktop))
92 (native-inputs
93 (list pkg-config))
94 (home-page "https://0pointer.de/lennart/projects/libcanberra/")
95 (synopsis
96 "Implementation of the XDG Sound Theme and Name Specifications")
97 (description
98 "Libcanberra is an implementation of the XDG Sound Theme and Name
99Specifications, for generating event sounds on free desktops, such as
100GNOME. It comes with several backends (ALSA, PulseAudio, OSS, GStreamer,
101null) and is designed to be portable.")
102 (license lgpl2.1+)))
103
104(define-public sound-theme-freedesktop
105 (package
106 (name "sound-theme-freedesktop")
107 (version "0.8")
108 (source (origin
109 (method url-fetch)
110 (uri (string-append "https://people.freedesktop.org/~mccann/dist/"
111 name "-" version ".tar.bz2"))
112 (sha256
113 (base32
114 "054abv4gmfk9maw93fis0bf605rc56dah7ys5plc4pphxqh8nlfb"))))
115 (build-system gnu-build-system)
116 (native-inputs (list intltool))
117 (synopsis "Audio samples for use as a desktop sound theme")
118 (description
119 "This package provides audio samples that can be used by libcanberra as
120sounds for various system events.")
121
122 ;; The license of the various sounds is given in the 'CREDITS' file.
123 (license (list cc-by-sa4.0 cc-by3.0 gpl2 gpl2+))
124
125 (home-page "https://www.freedesktop.org/wiki/Specifications/sound-theme-spec/")))
126
127(define-public python-pycanberra
128 (package
129 (name "python-pycanberra")
130 (version "0.1.1")
131 (source
132 (origin
133 (method url-fetch)
134 (uri (string-append "http://ftp.n0.is/pub/releases/"
135 "pycanberra-" version ".tar.xz"))
136 (sha256
137 (base32 "16jjf8fcgaprmz6jacsxrh17l1ad891fns38bxv49lg3s3mn1nj2"))))
138 (build-system pyproject-build-system)
139 (arguments (list #:tests? #f)) ;No tests included.
140 (native-inputs (list python-setuptools))
141 (propagated-inputs (list libcanberra))
142 (home-page "https://github.com/totdb/pycanberra")
143 (synopsis "Ctypes wrapper for the libcanberra API")
144 (description
145 "Pycanberra is a basic Python wrapper for libcanberra.")
146 (license lgpl2.1+)))