Commit | Line | Data |
---|---|---|
1b6826d3 RW |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net> | |
e8069d01 | 3 | ;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org> |
1b6826d3 RW |
4 | ;;; |
5 | ;;; This file is part of GNU Guix. | |
6 | ;;; | |
7 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
8 | ;;; under the terms of the GNU General Public License as published by | |
9 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
10 | ;;; your option) any later version. | |
11 | ;;; | |
12 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
13 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 | ;;; GNU General Public License for more details. | |
16 | ;;; | |
17 | ;;; You should have received a copy of the GNU General Public License | |
18 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
19 | ||
20 | (define-module (gnu packages music) | |
21 | #:use-module (guix utils) | |
22 | #:use-module (guix packages) | |
23 | #:use-module (guix download) | |
8e80244a | 24 | #:use-module (guix git-download) |
1b6826d3 RW |
25 | #:use-module ((guix licenses) #:prefix license:) |
26 | #:use-module (guix build-system gnu) | |
8b9ec354 | 27 | #:use-module (guix build-system cmake) |
821664f1 | 28 | #:use-module (guix build-system python) |
8e80244a | 29 | #:use-module (guix build-system waf) |
1b6826d3 | 30 | #:use-module (gnu packages) |
ddfddb0c | 31 | #:use-module (gnu packages algebra) |
c267cc15 | 32 | #:use-module (gnu packages audio) |
2d0fd07b | 33 | #:use-module (gnu packages autotools) |
8b9ec354 RW |
34 | #:use-module (gnu packages base) ;libbdf |
35 | #:use-module (gnu packages boost) | |
1b6826d3 | 36 | #:use-module (gnu packages bison) |
e8069d01 | 37 | #:use-module (gnu packages cdrom) |
8b9ec354 RW |
38 | #:use-module (gnu packages code) |
39 | #:use-module (gnu packages check) | |
40 | #:use-module (gnu packages compression) | |
1b6826d3 | 41 | #:use-module (gnu packages docbook) |
bf76d780 | 42 | #:use-module (gnu packages doxygen) |
1b6826d3 | 43 | #:use-module (gnu packages flex) |
8e80244a | 44 | #:use-module (gnu packages fltk) |
1b6826d3 RW |
45 | #:use-module (gnu packages fonts) |
46 | #:use-module (gnu packages fontutils) | |
6260d1a8 | 47 | #:use-module (gnu packages gcc) |
1b6826d3 RW |
48 | #:use-module (gnu packages gettext) |
49 | #:use-module (gnu packages ghostscript) | |
ec8da0e2 | 50 | #:use-module (gnu packages gl) |
8e80244a | 51 | #:use-module (gnu packages glib) |
c267cc15 | 52 | #:use-module (gnu packages gnome) |
1b6826d3 RW |
53 | #:use-module (gnu packages gtk) |
54 | #:use-module (gnu packages guile) | |
c267cc15 | 55 | #:use-module (gnu packages image) |
1b6826d3 | 56 | #:use-module (gnu packages imagemagick) |
6260d1a8 | 57 | #:use-module (gnu packages java) |
c267cc15 RW |
58 | #:use-module (gnu packages linux) ; for alsa-utils |
59 | #:use-module (gnu packages man) | |
60 | #:use-module (gnu packages mp3) | |
e8069d01 | 61 | #:use-module (gnu packages ncurses) |
1b6826d3 | 62 | #:use-module (gnu packages netpbm) |
821664f1 | 63 | #:use-module (gnu packages pdf) |
1b6826d3 RW |
64 | #:use-module (gnu packages perl) |
65 | #:use-module (gnu packages pkg-config) | |
d231bb35 | 66 | #:use-module (gnu packages pulseaudio) ;libsndfile |
1b6826d3 | 67 | #:use-module (gnu packages python) |
8b9ec354 | 68 | #:use-module (gnu packages qt) |
d231bb35 | 69 | #:use-module (gnu packages rdf) |
1b6826d3 | 70 | #:use-module (gnu packages rsync) |
2d0fd07b | 71 | #:use-module (gnu packages tcl) |
1b6826d3 RW |
72 | #:use-module (gnu packages texinfo) |
73 | #:use-module (gnu packages texlive) | |
e8069d01 | 74 | #:use-module (gnu packages video) |
8b9ec354 | 75 | #:use-module (gnu packages web) |
c267cc15 | 76 | #:use-module (gnu packages xml) |
ddfddb0c | 77 | #:use-module (gnu packages xorg) |
c267cc15 | 78 | #:use-module (gnu packages xiph) |
2d0fd07b RW |
79 | #:use-module (gnu packages zip) |
80 | #:use-module ((srfi srfi-1) #:select (last))) | |
1b6826d3 | 81 | |
e8069d01 PW |
82 | (define-public cmus |
83 | (package | |
84 | (name "cmus") | |
85 | (version "2.7.1") | |
86 | (source (origin | |
87 | (method url-fetch) | |
88 | (uri (string-append | |
89 | "https://github.com/" name "/" name "/archive/v" | |
90 | version ".tar.gz")) | |
566fc7fa | 91 | (file-name (string-append name "-" version ".tar.gz")) |
e8069d01 PW |
92 | (sha256 |
93 | (base32 | |
94 | "0raixgjavkm7hxppzsc5zqbfbh2bhjcmbiplhnsxsmyj8flafyc1")))) | |
95 | (build-system gnu-build-system) | |
96 | (arguments | |
97 | `(#:tests? #f ; cmus does not include tests | |
98 | #:phases | |
99 | (modify-phases %standard-phases | |
100 | (replace | |
101 | 'configure | |
102 | (lambda* (#:key outputs #:allow-other-keys) | |
103 | (let ((out (assoc-ref outputs "out"))) | |
104 | ||
105 | ;; It's an idiosyncratic configure script that doesn't | |
106 | ;; understand --prefix=..; it wants prefix=.. instead. | |
107 | (zero? | |
108 | (system* "./configure" | |
109 | (string-append "prefix=" out))))))))) | |
110 | ;; TODO: cmus optionally supports the following formats, which haven't yet | |
111 | ;; been added to Guix: | |
112 | ;; | |
113 | ;; - Roar, libroar | |
114 | ;; | |
115 | ;; - DISCID_LIBS, apparently different from cd-discid which is included in | |
116 | ;; Guix. See <http://sourceforge.net/projects/discid/> | |
117 | (native-inputs | |
118 | `(("pkg-config" ,pkg-config))) | |
119 | (inputs | |
120 | `(("alsa-lib" ,alsa-lib) | |
121 | ("ao" ,ao) | |
122 | ("ffmpeg" ,ffmpeg) | |
123 | ("flac" ,flac) | |
124 | ("jack" ,jack-1) | |
125 | ("libcddb" ,libcddb) | |
126 | ("libcdio-paranoia" ,libcdio-paranoia) | |
127 | ("libcue" ,libcue) | |
128 | ("libmad" ,libmad) | |
129 | ("libmodplug" ,libmodplug) | |
130 | ("libmpcdec" ,libmpcdec) | |
131 | ("libsamplerate" ,libsamplerate) | |
132 | ("libvorbis" ,libvorbis) | |
133 | ("ncurses" ,ncurses) | |
134 | ("opusfile" ,opusfile) | |
135 | ("pulseaudio" ,pulseaudio) | |
136 | ("wavpack" ,wavpack))) | |
137 | (home-page "https://cmus.github.io/") | |
138 | (synopsis "Small console music player") | |
139 | (description "Cmus is a small and fast console music player. It supports | |
140 | many input formats and provides a customisable Vi-style user interface.") | |
141 | (license license:gpl2+))) | |
142 | ||
d231bb35 RW |
143 | (define-public hydrogen |
144 | (package | |
145 | (name "hydrogen") | |
146 | (version "0.9.5.1") | |
147 | (source (origin | |
148 | (method url-fetch) | |
149 | (uri (string-append | |
150 | "mirror://sourceforge/hydrogen/Hydrogen/" | |
151 | (version-prefix version 3) "%20Sources/" | |
152 | "hydrogen-" version ".tar.gz")) | |
153 | (sha256 | |
154 | (base32 | |
155 | "1fvyp6gfzcqcc90dmaqbm11p272zczz5pfz1z4lj33nfr7z0bqgb")))) | |
156 | (build-system gnu-build-system) | |
157 | (arguments | |
158 | `(#:tests? #f ;no "check" target | |
159 | #:phases | |
160 | ;; TODO: Add scons-build-system and use it here. | |
161 | (modify-phases %standard-phases | |
162 | (delete 'configure) | |
163 | (add-after 'unpack 'scons-propagate-environment | |
164 | (lambda _ | |
165 | ;; By design, SCons does not, by default, propagate | |
166 | ;; environment variables to subprocesses. See: | |
167 | ;; <http://comments.gmane.org/gmane.linux.distributions.nixos/4969> | |
168 | ;; Here, we modify the Sconstruct file to arrange for | |
169 | ;; environment variables to be propagated. | |
170 | (substitute* "Sconstruct" | |
171 | (("^env = Environment\\(") | |
172 | "env = Environment(ENV=os.environ, ")))) | |
173 | (replace 'build | |
174 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
175 | (let ((out (assoc-ref outputs "out"))) | |
176 | (zero? (system* "scons" | |
177 | (string-append "prefix=" out) | |
178 | "lrdf=0" ; cannot be found | |
179 | "lash=1"))))) | |
180 | (add-before | |
181 | 'install | |
182 | 'fix-img-install | |
183 | (lambda _ | |
184 | ;; The whole ./data/img directory is copied to the target first. | |
185 | ;; Scons complains about existing files when we try to install all | |
186 | ;; images a second time. | |
187 | (substitute* "Sconstruct" | |
188 | (("os.path.walk\\(\"./data/img/\",install_images,env\\)") "")) | |
189 | #t)) | |
190 | (replace 'install (lambda _ (zero? (system* "scons" "install"))))))) | |
191 | (native-inputs | |
192 | `(("scons" ,scons) | |
193 | ("python" ,python-2) | |
194 | ("pkg-config" ,pkg-config))) | |
195 | (inputs | |
196 | `(("zlib" ,zlib) | |
197 | ("libtar" ,libtar) | |
198 | ("alsa-lib" ,alsa-lib) | |
199 | ("jack" ,jack-1) | |
200 | ("lash" ,lash) | |
201 | ;;("lrdf" ,lrdf) ;FIXME: cannot be found by scons | |
202 | ("qt" ,qt-4) | |
203 | ("libsndfile" ,libsndfile))) | |
204 | (home-page "http://www.hydrogen-music.org") | |
205 | (synopsis "Drum machine") | |
206 | (description | |
207 | "Hydrogen is an advanced drum machine for GNU/Linux. Its main goal is to | |
208 | enable professional yet simple and intuitive pattern-based drum programming.") | |
209 | (license license:gpl2+))) | |
210 | ||
8c454dcd RW |
211 | (define-public klick |
212 | (package | |
213 | (name "klick") | |
214 | (version "0.12.2") | |
215 | (source (origin | |
216 | (method url-fetch) | |
217 | (uri (string-append "http://das.nasophon.de/download/klick-" | |
218 | version ".tar.gz")) | |
219 | (sha256 | |
220 | (base32 | |
221 | "0hmcaywnwzjci3pp4xpvbijnnwvibz7gf9xzcdjbdca910y5728j")))) | |
222 | (build-system gnu-build-system) | |
223 | (arguments | |
224 | `(#:tests? #f ;no "check" target | |
225 | #:phases | |
226 | ;; TODO: Add scons-build-system and use it here. | |
227 | (modify-phases %standard-phases | |
228 | (delete 'configure) | |
229 | (replace 'build | |
230 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
231 | (let ((out (assoc-ref outputs "out"))) | |
232 | (mkdir-p out) | |
233 | (zero? (system* "scons" (string-append "PREFIX=" out)))))) | |
234 | (replace 'install (lambda _ (zero? (system* "scons" "install"))))))) | |
235 | (inputs | |
236 | `(("boost" ,boost) | |
237 | ("jack" ,jack-1) | |
238 | ("libsndfile" ,libsndfile) | |
239 | ("libsamplerate" ,libsamplerate) | |
240 | ("liblo" ,liblo) | |
241 | ("rubberband" ,rubberband))) | |
242 | (native-inputs | |
243 | `(("scons" ,scons) | |
244 | ("python" ,python-2) | |
245 | ("pkg-config" ,pkg-config))) | |
246 | (home-page "http://das.nasophon.de/klick/") | |
247 | (synopsis "Metronome for JACK") | |
248 | (description | |
249 | "klick is an advanced command-line based metronome for JACK. It allows | |
250 | you to define complex tempo maps for entire songs or performances.") | |
251 | (license license:gpl2+))) | |
252 | ||
1b6826d3 RW |
253 | (define-public lilypond |
254 | (package | |
255 | (name "lilypond") | |
127b04d7 | 256 | (version "2.19.27") |
1b6826d3 RW |
257 | (source (origin |
258 | (method url-fetch) | |
259 | (uri (string-append | |
260 | "http://download.linuxaudio.org/lilypond/sources/v" | |
261 | (version-major+minor version) "/" | |
262 | name "-" version ".tar.gz")) | |
263 | (sha256 | |
264 | (base32 | |
127b04d7 | 265 | "11v4jr4qj1jpqvjw1ww7riv8pxfyasif8mf16l447f1xq1ifhkhs")))) |
1b6826d3 RW |
266 | (build-system gnu-build-system) |
267 | (arguments | |
127b04d7 | 268 | `(#:tests? #f ; out-test/collated-files.html fails |
1b6826d3 | 269 | #:out-of-source? #t |
127b04d7 RW |
270 | #:configure-flags |
271 | (list (string-append "--with-texgyre-dir=" | |
272 | (assoc-ref %build-inputs "font-tex-gyre") | |
273 | "/share/fonts/opentype/")) | |
1b6826d3 | 274 | #:phases |
a8bc747a RW |
275 | (modify-phases %standard-phases |
276 | (add-after 'unpack 'hardcode-path-to-gs | |
277 | (lambda* (#:key inputs #:allow-other-keys) | |
278 | (substitute* "scm/backend-library.scm" | |
279 | (("\\(search-executable '\\(\"gs\"\\)\\)") | |
280 | (string-append "\"" | |
281 | (assoc-ref inputs "ghostscript") | |
282 | "/bin/gs" | |
283 | "\"" ))) | |
284 | #t)) | |
285 | (add-before 'configure 'prepare-configuration | |
286 | (lambda _ | |
287 | (substitute* "configure" | |
288 | (("SHELL=/bin/sh") "SHELL=sh")) | |
289 | (setenv "out" "") | |
290 | #t))))) | |
1b6826d3 RW |
291 | (inputs |
292 | `(("guile" ,guile-1.8) | |
293 | ("font-dejavu" ,font-dejavu) | |
127b04d7 | 294 | ("font-tex-gyre" ,font-tex-gyre) |
1b6826d3 RW |
295 | ("fontconfig" ,fontconfig) |
296 | ("freetype" ,freetype) | |
297 | ("ghostscript" ,ghostscript) | |
298 | ("pango" ,pango) | |
299 | ("python" ,python-2))) | |
300 | (native-inputs | |
301 | `(("bison" ,bison) | |
302 | ("perl" ,perl) | |
303 | ("flex" ,flex) | |
304 | ("fontforge" ,fontforge) | |
305 | ("dblatex" ,dblatex) | |
306 | ("gettext" ,gnu-gettext) | |
307 | ("imagemagick" ,imagemagick) | |
308 | ("netpbm" ,netpbm) ;for pngtopnm | |
309 | ("texlive" ,texlive) ;metafont and metapost | |
310 | ("texinfo" ,texinfo) | |
311 | ("texi2html" ,texi2html) | |
312 | ("rsync" ,rsync) | |
313 | ("pkg-config" ,pkg-config) | |
314 | ("zip" ,zip))) | |
315 | (home-page "http://www.lilypond.org/") | |
316 | (synopsis "Music typesetting") | |
317 | (description | |
318 | "GNU LilyPond is a music typesetter, which produces high-quality sheet | |
319 | music. Music is input in a text file containing control sequences which are | |
320 | interpreted by LilyPond to produce the final document. It is extendable with | |
321 | Guile.") | |
322 | (license license:gpl3+))) | |
c267cc15 | 323 | |
8e80244a RW |
324 | (define-public non-sequencer |
325 | ;; The latest tagged release is three years old and uses a custom build | |
326 | ;; system, so we take the last commit affecting the "sequencer" directory. | |
327 | (let ((commit "1d9bd576")) | |
328 | (package | |
329 | (name "non-sequencer") | |
330 | (version (string-append "1.9.5-" commit)) | |
331 | (source (origin | |
332 | (method git-fetch) | |
333 | (uri (git-reference | |
334 | (url "git://git.tuxfamily.org/gitroot/non/non.git") | |
335 | (commit commit))) | |
336 | (sha256 | |
337 | (base32 | |
338 | "0pkkw8q6d55j38xm7r4rwpdv1wy00a44h8c4wrn7vbgpq9nij46y")) | |
339 | (file-name (string-append name "-" version "-checkout")))) | |
340 | (build-system waf-build-system) | |
341 | (arguments | |
342 | `(#:tests? #f ;no "check" target | |
e591a4d6 RW |
343 | #:configure-flags |
344 | (list "--project=sequencer" | |
345 | ;; Disable the use of SSE unless on x86_64. | |
346 | ,@(if (not (string-prefix? "x86_64" (or (%current-target-system) | |
347 | (%current-system)))) | |
348 | '("--disable-sse") | |
349 | '())) | |
d8c317df SB |
350 | #:phases |
351 | (modify-phases %standard-phases | |
352 | (add-before | |
353 | 'configure 'set-flags | |
354 | (lambda _ | |
355 | ;; Compile with C++11, required by libsigc++. | |
356 | (setenv "CXXFLAGS" "-std=c++11") | |
357 | #t))) | |
8e80244a RW |
358 | #:python ,python-2)) |
359 | (inputs | |
360 | `(("jack" ,jack-1) | |
361 | ("libsigc++" ,libsigc++) | |
362 | ("liblo" ,liblo) | |
363 | ("ntk" ,ntk))) | |
364 | (native-inputs | |
365 | `(("pkg-config" ,pkg-config))) | |
366 | (home-page "http://non.tuxfamily.org/wiki/Non%20Sequencer") | |
367 | (synopsis "Pattern-based MIDI sequencer") | |
368 | (description | |
369 | "The Non Sequencer is a powerful, lightweight, real-time, | |
370 | pattern-based MIDI sequencer. It utilizes the JACK Audio Connection Kit for | |
371 | MIDI I/O and the NTK GUI toolkit for its user interface. Everything in Non | |
372 | Sequencer happens on-line, in real-time. Music can be composed live, while the | |
373 | transport is rolling.") | |
374 | (license license:gpl2+)))) | |
375 | ||
c267cc15 RW |
376 | (define-public solfege |
377 | (package | |
378 | (name "solfege") | |
379 | (version "3.22.2") | |
380 | (source (origin | |
381 | (method url-fetch) | |
382 | (uri (string-append | |
383 | "mirror://gnu/solfege/solfege-" | |
384 | version ".tar.xz")) | |
385 | (sha256 | |
386 | (base32 | |
387 | "1w25rxdbj907nsx285k9nm480pvy12w3yknfh4n1dfv17cwy072i")))) | |
388 | (build-system gnu-build-system) | |
389 | (arguments | |
390 | `(#:tests? #f ; xmllint attempts to download DTD | |
391 | #:test-target "test" | |
392 | #:phases | |
393 | (alist-cons-after | |
394 | 'unpack 'fix-configuration | |
395 | (lambda* (#:key inputs #:allow-other-keys) | |
396 | (substitute* "default.config" | |
397 | (("csound=csound") | |
398 | (string-append "csound=" | |
399 | (assoc-ref inputs "csound") | |
400 | "/bin/csound")) | |
401 | (("/usr/bin/aplay") | |
402 | (string-append (assoc-ref inputs "aplay") | |
403 | "/bin/aplay")) | |
404 | (("/usr/bin/timidity") | |
405 | (string-append (assoc-ref inputs "timidity") | |
406 | "/bin/timidity")) | |
407 | (("/usr/bin/mpg123") | |
408 | (string-append (assoc-ref inputs "mpg123") | |
409 | "/bin/mpg123")) | |
410 | (("/usr/bin/ogg123") | |
411 | (string-append (assoc-ref inputs "ogg123") | |
412 | "/bin/ogg123")))) | |
413 | (alist-cons-before | |
414 | 'build 'patch-python-shebangs | |
415 | (lambda _ | |
416 | ;; Two python scripts begin with a Unicode BOM, so patch-shebang | |
417 | ;; has no effect. | |
418 | (substitute* '("solfege/parsetree.py" | |
419 | "solfege/presetup.py") | |
420 | (("#!/usr/bin/python") (string-append "#!" (which "python"))))) | |
421 | (alist-cons-before | |
422 | 'build 'add-sitedirs | |
423 | ;; .pth files are not automatically interpreted unless the | |
424 | ;; directories containing them are added as "sites". The directories | |
425 | ;; are then added to those in the PYTHONPATH. This is required for | |
426 | ;; the operation of pygtk and pygobject. | |
427 | (lambda _ | |
428 | (substitute* "run-solfege.py" | |
429 | (("import os") | |
430 | "import os, site | |
431 | for path in [path for path in sys.path if 'site-packages' in path]: site.addsitedir(path)"))) | |
432 | (alist-cons-before | |
433 | 'build 'adjust-config-file-prefix | |
434 | (lambda* (#:key outputs #:allow-other-keys) | |
435 | (substitute* "run-solfege.py" | |
436 | (("prefix = os.path.*$") | |
437 | (string-append "prefix = " (assoc-ref outputs "out"))))) | |
438 | (alist-cons-after | |
439 | 'install 'wrap-program | |
440 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
441 | ;; Make sure 'solfege' runs with the correct PYTHONPATH. We | |
442 | ;; also need to modify GDK_PIXBUF_MODULE_FILE for SVG support. | |
443 | (let* ((out (assoc-ref outputs "out")) | |
444 | (path (getenv "PYTHONPATH")) | |
445 | (rsvg (assoc-ref inputs "librsvg")) | |
446 | (pixbuf (find-files rsvg "^loaders\\.cache$"))) | |
447 | (wrap-program (string-append out "/bin/solfege") | |
448 | `("PYTHONPATH" ":" prefix (,path)) | |
449 | `("GDK_PIXBUF_MODULE_FILE" ":" prefix ,pixbuf)))) | |
450 | %standard-phases))))))) | |
451 | (inputs | |
452 | `(("python" ,python-2) | |
453 | ("pygtk" ,python2-pygtk) | |
454 | ("gettext" ,gnu-gettext) | |
455 | ("gtk" ,gtk+) | |
456 | ;; TODO: Lilypond is optional. Produces errors at build time: | |
457 | ;; Drawing systems...Error: /undefinedresult in --glyphshow-- | |
458 | ;; Fontconfig is needed to fix one of the errors, but other similar | |
459 | ;; errors remain. | |
460 | ;;("lilypond" ,lilypond) | |
461 | ("librsvg" ,librsvg) ; needed at runtime for icons | |
462 | ("libpng" ,libpng) ; needed at runtime for icons | |
463 | ;; players needed at runtime | |
464 | ("aplay" ,alsa-utils) | |
465 | ("csound" ,csound) ; optional, needed for some exercises | |
466 | ("mpg123" ,mpg123) | |
467 | ("ogg123" ,vorbis-tools) | |
468 | ("timidity" ,timidity++))) | |
469 | (native-inputs | |
470 | `(("pkg-config" ,pkg-config) | |
471 | ("txt2man" ,txt2man) | |
472 | ("libxml2" ,libxml2) ; for tests | |
473 | ("ghostscript" ,ghostscript) | |
474 | ;;("fontconfig" ,fontconfig) ; only needed with lilypond | |
475 | ;;("freetype" ,freetype) ; only needed with lilypond | |
476 | ("texinfo" ,texinfo))) | |
477 | (home-page "https://www.gnu.org/software/solfege/") | |
478 | (synopsis "Ear training") | |
479 | (description | |
480 | "GNU Solfege is a program for practicing musical ear-training. With it, | |
481 | you can practice your recognition of various musical intervals and chords. It | |
482 | features a statistics overview so you can monitor your progress across several | |
483 | sessions. Solfege is also designed to be extensible so you can easily write | |
484 | your own lessons.") | |
485 | (license license:gpl3+))) | |
6260d1a8 | 486 | |
8b9ec354 RW |
487 | (define-public powertabeditor |
488 | (package | |
489 | (name "powertabeditor") | |
d19cf783 | 490 | (version "2.0.0-alpha8") |
8b9ec354 RW |
491 | (source (origin |
492 | (method url-fetch) | |
493 | (uri (string-append | |
494 | "https://github.com/powertab/powertabeditor/archive/" | |
495 | version ".tar.gz")) | |
496 | (file-name (string-append name "-" version ".tar.gz")) | |
497 | (sha256 | |
498 | (base32 | |
d19cf783 | 499 | "0gaa2x209v3azql8ak3r1n9a9qbxjx2ssirvwdxwklv2lmfqkm82")) |
8b9ec354 RW |
500 | (modules '((guix build utils))) |
501 | (snippet | |
502 | '(begin | |
503 | ;; Remove bundled sources for external libraries | |
504 | (delete-file-recursively "external") | |
505 | (substitute* "CMakeLists.txt" | |
506 | (("include_directories\\(\\$\\{PROJECT_SOURCE_DIR\\}/external/.*") "") | |
8b9ec354 RW |
507 | (("add_subdirectory\\(external\\)") "")) |
508 | (substitute* "test/CMakeLists.txt" | |
509 | (("include_directories\\(\\$\\{PROJECT_SOURCE_DIR\\}/external/.*") "")) | |
510 | ||
511 | ;; Add install target | |
512 | (substitute* "source/CMakeLists.txt" | |
513 | (("qt5_use_modules") | |
514 | (string-append | |
515 | "install(TARGETS powertabeditor " | |
516 | "RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)\n" | |
517 | "install(FILES data/tunings.json DESTINATION " | |
518 | "${CMAKE_INSTALL_PREFIX}/share/powertabeditor/)\n" | |
519 | "qt5_use_modules"))) | |
520 | #t)))) | |
521 | (build-system cmake-build-system) | |
522 | (arguments | |
7e11d113 | 523 | `(#:modules ((guix build cmake-build-system) |
8b9ec354 RW |
524 | (guix build utils) |
525 | (ice-9 match)) | |
526 | #:configure-flags | |
527 | ;; CMake appears to lose the RUNPATH for some reason, so it has to be | |
528 | ;; explicitly set with CMAKE_INSTALL_RPATH. | |
7e11d113 RW |
529 | (list "-DCMAKE_BUILD_WITH_INSTALL_RPATH=TRUE" |
530 | "-DCMAKE_ENABLE_PRECOMPILED_HEADERS=OFF" ; if ON pte_tests cannot be built | |
531 | (string-append "-DCMAKE_INSTALL_RPATH=" | |
8b9ec354 RW |
532 | (string-join (map (match-lambda |
533 | ((name . directory) | |
534 | (string-append directory "/lib"))) | |
535 | %build-inputs) ";"))) | |
536 | #:phases | |
537 | (modify-phases %standard-phases | |
7e11d113 RW |
538 | (replace |
539 | 'check | |
540 | (lambda _ | |
541 | (zero? (system* "bin/pte_tests" | |
542 | ;; Exclude this failing test | |
543 | "~Formats/PowerTabOldImport/Directions")))) | |
544 | (add-before | |
545 | 'configure 'fix-tests | |
546 | (lambda _ | |
547 | ;; Tests cannot be built with precompiled headers | |
548 | (substitute* "test/CMakeLists.txt" | |
549 | (("cotire\\(pte_tests\\)") "")) | |
550 | #t)) | |
8b9ec354 RW |
551 | (add-before |
552 | 'configure 'remove-third-party-libs | |
553 | (lambda* (#:key inputs #:allow-other-keys) | |
554 | ;; Link with required static libraries, because we're not | |
555 | ;; using the bundled version of withershins. | |
556 | (substitute* '("source/CMakeLists.txt" | |
557 | "test/CMakeLists.txt") | |
7e11d113 | 558 | (("target_link_libraries\\((powertabeditor|pte_tests)" _ target) |
8b9ec354 RW |
559 | (string-append "target_link_libraries(" target " " |
560 | (assoc-ref inputs "binutils") | |
561 | "/lib/libbfd.a " | |
d6902798 | 562 | (assoc-ref inputs "libiberty") |
8b9ec354 RW |
563 | "/lib/libiberty.a " |
564 | "dl"))) | |
565 | #t))))) | |
566 | (inputs | |
567 | `(("boost" ,boost) | |
568 | ("alsa-lib" ,alsa-lib) | |
569 | ("qt" ,qt) | |
570 | ("withershins" ,withershins) | |
d6902798 | 571 | ("libiberty" ,libiberty) ;for withershins |
8b9ec354 RW |
572 | ("binutils" ,binutils) ;for -lbfd and -liberty (for withershins) |
573 | ("timidity" ,timidity++) | |
574 | ("pugixml" ,pugixml) | |
575 | ("rtmidi" ,rtmidi) | |
576 | ("rapidjson" ,rapidjson) | |
577 | ("zlib" ,zlib))) | |
578 | (native-inputs | |
579 | `(("catch" ,catch-framework) | |
580 | ("pkg-config" ,pkg-config))) | |
581 | (home-page "http://powertabs.net") | |
582 | (synopsis "Guitar tablature editor") | |
583 | (description | |
584 | "Power Tab Editor 2.0 is the successor to the famous original Power Tab | |
585 | Editor. It is compatible with Power Tab Editor 1.7 and Guitar Pro.") | |
586 | (license license:gpl3+))) | |
587 | ||
ec8da0e2 RW |
588 | (define-public setbfree |
589 | (package | |
590 | (name "setbfree") | |
591 | (version "0.8.0") | |
592 | (source (origin | |
593 | (method url-fetch) | |
594 | (uri | |
595 | (string-append | |
596 | "https://github.com/pantherb/setBfree/releases/download/v" | |
597 | version "/setbfree-" version ".tar.gz")) | |
598 | (sha256 | |
599 | (base32 | |
600 | "045bgp7qsigpbrhk7qvgvliwiy26sajifwn7f2jvk90ckfqnlw4b")))) | |
601 | (build-system gnu-build-system) | |
602 | (arguments | |
603 | `(#:tests? #f ; no "check" target | |
604 | #:make-flags | |
605 | (list (string-append "PREFIX=" (assoc-ref %outputs "out")) | |
606 | (string-append "FONTFILE=" | |
607 | (assoc-ref %build-inputs "font-bitstream-vera") | |
b42d4508 RW |
608 | "/share/fonts/truetype/VeraBd.ttf") |
609 | ;; Disable unsupported optimization flags on non-x86 | |
610 | ,@(let ((system (or (%current-target-system) | |
611 | (%current-system)))) | |
612 | (if (or (string-prefix? "x86_64" system) | |
613 | (string-prefix? "i686" system)) | |
614 | '() | |
615 | '("OPTIMIZATIONS=-ffast-math -fomit-frame-pointer -O3")))) | |
ec8da0e2 RW |
616 | #:phases |
617 | (modify-phases %standard-phases | |
618 | (add-before 'build 'set-CC-variable | |
619 | (lambda _ (setenv "CC" "gcc") #t)) | |
620 | (delete 'configure)))) | |
621 | (inputs | |
622 | `(("jack" ,jack-1) | |
623 | ("lv2" ,lv2) | |
624 | ("zita-convolver" ,zita-convolver) | |
625 | ("glu" ,glu) | |
626 | ("ftgl" ,ftgl) | |
627 | ("font-bitstream-vera" ,font-bitstream-vera))) | |
628 | (native-inputs | |
629 | `(("help2man" ,help2man) | |
630 | ("pkg-config" ,pkg-config))) | |
631 | (home-page "http://setbfree.org") | |
632 | (synopsis "Tonewheel organ") | |
633 | (description | |
634 | "setBfree is a MIDI-controlled, software synthesizer designed to imitate | |
635 | the sound and properties of the electromechanical organs and sound | |
636 | modification devices that brought world-wide fame to the names and products of | |
637 | Laurens Hammond and Don Leslie.") | |
638 | (license license:gpl2+))) | |
639 | ||
6260d1a8 RW |
640 | (define-public tuxguitar |
641 | (package | |
642 | (name "tuxguitar") | |
643 | (version "1.2") | |
644 | (source (origin | |
645 | (method url-fetch) | |
646 | (uri (string-append | |
647 | "mirror://sourceforge/tuxguitar/TuxGuitar/TuxGuitar-" | |
648 | version "/tuxguitar-src-" version ".tar.gz")) | |
649 | (sha256 | |
650 | (base32 | |
651 | "1g1yf2gd06fzdhqb8kb8dmdcmr602s9y24f01kyl4940wimgr944")))) | |
652 | (build-system gnu-build-system) | |
653 | (arguments | |
654 | `(#:make-flags (list (string-append "LDFLAGS=-Wl,-rpath=" | |
655 | (assoc-ref %outputs "out") "/lib") | |
656 | (string-append "PREFIX=" | |
657 | (assoc-ref %outputs "out")) | |
658 | (string-append "SWT_PATH=" | |
659 | (assoc-ref %build-inputs "swt") | |
660 | "/share/java/swt.jar")) | |
661 | #:tests? #f ;no "check" target | |
662 | #:parallel-build? #f ;not supported | |
663 | #:phases | |
664 | (alist-cons-before | |
665 | 'build 'enter-dir-set-path-and-pass-ldflags | |
666 | (lambda* (#:key inputs #:allow-other-keys) | |
667 | (chdir "TuxGuitar") | |
668 | (substitute* "GNUmakefile" | |
669 | (("PROPERTIES\\?=") | |
670 | (string-append "PROPERTIES?= -Dswt.library.path=" | |
671 | (assoc-ref inputs "swt") "/lib")) | |
672 | (("\\$\\(GCJ\\) -o") "$(GCJ) $(LDFLAGS) -o")) | |
673 | #t) | |
674 | (alist-delete 'configure %standard-phases)))) | |
675 | (inputs | |
676 | `(("swt" ,swt))) | |
677 | (native-inputs | |
397dbde8 | 678 | `(("gcj" ,gcj) |
6260d1a8 RW |
679 | ("pkg-config" ,pkg-config))) |
680 | (home-page "http://tuxguitar.com.ar") | |
681 | (synopsis "Multitrack tablature editor and player") | |
682 | (description | |
683 | "TuxGuitar is a guitar tablature editor with player support through midi. | |
684 | It can display scores and multitrack tabs. TuxGuitar provides various | |
685 | additional features, including autoscrolling while playing, note duration | |
686 | management, bend/slide/vibrato/hammer-on/pull-off effects, support for | |
687 | tuplets, time signature management, tempo management, gp3/gp4/gp5 import and | |
688 | export.") | |
689 | (license license:lgpl2.1+))) | |
2d0fd07b RW |
690 | |
691 | (define-public pd | |
692 | (package | |
693 | (name "pd") | |
694 | (version "0.45.4") | |
695 | (source (origin | |
696 | (method url-fetch) | |
697 | (uri | |
698 | (string-append "mirror://sourceforge/pure-data/pure-data/" | |
699 | version "/pd-" (version-major+minor version) | |
700 | "-" (last (string-split version #\.)) | |
701 | ".src.tar.gz")) | |
702 | (sha256 | |
703 | (base32 | |
704 | "1ls2ap5yi2zxvmr247621g4jx0hhfds4j5704a050bn2n3l0va2p")))) | |
705 | (build-system gnu-build-system) | |
706 | (arguments | |
707 | `(#:tests? #f ; no "check" target | |
708 | #:phases | |
709 | (modify-phases %standard-phases | |
710 | (add-before | |
711 | 'configure 'fix-wish-path | |
712 | (lambda _ | |
713 | (substitute* "src/s_inter.c" | |
714 | ((" wish ") (string-append " " (which "wish8.6") " "))) | |
715 | (substitute* "tcl/pd-gui.tcl" | |
716 | (("exec wish ") (string-append "exec " (which "wish8.6") " "))) | |
717 | #t)) | |
718 | (add-after | |
719 | 'unpack 'autoconf | |
720 | (lambda _ (zero? (system* "autoreconf" "-vfi"))))))) | |
721 | (native-inputs | |
722 | `(("autoconf" ,autoconf) | |
723 | ("automake" ,automake) | |
724 | ("libtool" ,libtool) | |
725 | ("gettext" ,gnu-gettext) | |
726 | ("pkg-config" ,pkg-config))) | |
727 | (inputs | |
728 | `(("tk" ,tk) | |
729 | ("alsa-lib" ,alsa-lib) | |
730 | ("jack" ,jack-1))) | |
731 | (home-page "http://puredata.info") | |
732 | (synopsis "Visual programming language for artistic performances") | |
733 | (description | |
734 | "Pure Data (aka Pd) is a visual programming language. Pd enables | |
735 | musicians, visual artists, performers, researchers, and developers to create | |
736 | software graphically, without writing lines of code. Pd is used to process | |
737 | and generate sound, video, 2D/3D graphics, and interface sensors, input | |
738 | devices, and MIDI. Pd can easily work over local and remote networks to | |
739 | integrate wearable technology, motor systems, lighting rigs, and other | |
740 | equipment. Pd is suitable for learning basic multimedia processing and visual | |
741 | programming methods as well as for realizing complex systems for large-scale | |
742 | projects.") | |
743 | (license license:bsd-3))) | |
821664f1 RW |
744 | |
745 | (define-public frescobaldi | |
746 | (package | |
747 | (name "frescobaldi") | |
748 | (version "2.18.1") | |
749 | (source (origin | |
750 | (method url-fetch) | |
751 | (uri (string-append | |
752 | "https://github.com/wbsoft/frescobaldi/releases/download/v" | |
753 | version "/frescobaldi-" version ".tar.gz")) | |
754 | (sha256 | |
755 | (base32 | |
756 | "1hflc6gck6dn17czc2ldai5j0ynfg3df8lqcggdry06qxsdbnns7")))) | |
757 | (build-system python-build-system) | |
758 | (inputs | |
759 | `(("lilypond" ,lilypond) | |
760 | ("python-pyqt-4" ,python-pyqt-4) | |
761 | ("python-ly" ,python-ly) | |
762 | ("poppler" ,poppler) | |
763 | ("python-poppler-qt4" ,python-poppler-qt4) | |
764 | ("python-sip" ,python-sip))) | |
765 | (home-page "http://www.frescobaldi.org/") | |
766 | (synopsis "LilyPond sheet music text editor") | |
767 | (description | |
768 | "Frescobaldi is a LilyPond sheet music text editor with syntax | |
769 | highlighting and automatic completion. Among other things, it can render | |
770 | scores next to the source, can capture input from MIDI or read MusicXML and | |
771 | ABC files, has a MIDI player for proof-listening, and includes a documentation | |
772 | browser.") | |
773 | (license license:gpl2+))) | |
ddfddb0c | 774 | |
bf76d780 RW |
775 | (define-public drumstick |
776 | (package | |
777 | (name "drumstick") | |
778 | (version "1.0.1") | |
779 | (source (origin | |
780 | (method url-fetch) | |
781 | (uri (string-append "mirror://sourceforge/drumstick/" | |
782 | version "/drumstick-" version ".tar.bz2")) | |
783 | (sha256 | |
784 | (base32 | |
785 | "0mxgix85b2qqs859z91cxik5x0s60dykqiflbj62px9akvf91qdv")))) | |
786 | (build-system cmake-build-system) | |
787 | (arguments | |
788 | `(#:tests? #f ; no test target | |
789 | #:configure-flags '("-DLIB_SUFFIX=") | |
790 | #:phases | |
791 | (modify-phases %standard-phases | |
792 | (add-before 'configure 'fix-docbook | |
793 | (lambda* (#:key inputs #:allow-other-keys) | |
794 | (substitute* "cmake_admin/CreateManpages.cmake" | |
795 | (("http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl") | |
796 | (string-append (assoc-ref inputs "docbook-xsl") | |
797 | "/xml/xsl/docbook-xsl-" | |
798 | ,(package-version docbook-xsl) | |
799 | "/manpages/docbook.xsl"))) | |
800 | #t))))) | |
801 | (inputs | |
802 | `(("qt" ,qt) | |
803 | ("alsa-lib" ,alsa-lib) | |
804 | ("fluidsynth" ,fluidsynth))) | |
805 | (native-inputs | |
806 | `(("pkg-config" ,pkg-config) | |
807 | ("libxslt" ,libxslt) ;for xsltproc | |
808 | ("docbook-xsl" ,docbook-xsl) | |
809 | ("doxygen" ,doxygen))) | |
810 | (home-page "http://drumstick.sourceforge.net/") | |
811 | (synopsis "C++ MIDI library") | |
812 | (description | |
813 | "Drumstick is a set of MIDI libraries using C++/Qt5 idioms and style. It | |
814 | includes a C++ wrapper around the ALSA library sequencer interface. A | |
815 | complementary library provides classes for processing SMF (Standard MIDI | |
816 | files: .MID/.KAR), Cakewalk (.WRK), and Overture (.OVE) file formats. A | |
817 | multiplatform realtime MIDI I/O library is also provided with various output | |
818 | backends, including ALSA, OSS, Network and FluidSynth.") | |
819 | (license license:gpl2+))) | |
820 | ||
8e92cfb1 RW |
821 | (define-public vmpk |
822 | (package | |
823 | (name "vmpk") | |
824 | (version "0.6.1") | |
825 | (source (origin | |
826 | (method url-fetch) | |
827 | (uri (string-append "mirror://sourceforge/vmpk/vmpk/" | |
828 | version "/vmpk-" version ".tar.bz2")) | |
829 | (sha256 | |
830 | (base32 | |
831 | "0ranldd033bd31m9d2vkbkn9zp1k46xbaysllai2i95rf1nhirqc")))) | |
832 | (build-system cmake-build-system) | |
833 | (arguments | |
834 | `(#:tests? #f ; no test target | |
835 | #:phases | |
836 | (modify-phases %standard-phases | |
837 | (add-before 'configure 'fix-docbook | |
838 | (lambda* (#:key inputs #:allow-other-keys) | |
839 | (substitute* "cmake_admin/CreateManpages.cmake" | |
840 | (("http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl") | |
841 | (string-append (assoc-ref inputs "docbook-xsl") | |
842 | "/xml/xsl/docbook-xsl-" | |
843 | ,(package-version docbook-xsl) | |
844 | "/manpages/docbook.xsl"))) | |
845 | #t))))) | |
846 | (inputs | |
847 | `(("drumstick" ,drumstick) | |
848 | ("qt" ,qt))) | |
849 | (native-inputs | |
850 | `(("libxslt" ,libxslt) ;for xsltproc | |
851 | ("docbook-xsl" ,docbook-xsl) | |
852 | ("pkg-config" ,pkg-config))) | |
853 | (home-page "http://vmpk.sourceforge.net") | |
854 | (synopsis "Virtual MIDI piano keyboard") | |
855 | (description | |
856 | "Virtual MIDI Piano Keyboard is a MIDI events generator and receiver. It | |
857 | doesn't produce any sound by itself, but can be used to drive a MIDI | |
858 | synthesizer (either hardware or software, internal or external). You can use | |
859 | the computer's keyboard to play MIDI notes, and also the mouse. You can use | |
860 | the Virtual MIDI Piano Keyboard to display the played MIDI notes from another | |
861 | instrument or MIDI file player.") | |
862 | (license license:gpl3+))) | |
863 | ||
ddfddb0c RW |
864 | (define-public zynaddsubfx |
865 | (package | |
866 | (name "zynaddsubfx") | |
f836fb8d | 867 | (version "2.5.2") |
ddfddb0c RW |
868 | (source (origin |
869 | (method url-fetch) | |
870 | (uri (string-append | |
871 | "mirror://sourceforge/zynaddsubfx/zynaddsubfx/" | |
872 | version "/zynaddsubfx-" version ".tar.gz")) | |
873 | (sha256 | |
874 | (base32 | |
f836fb8d | 875 | "11yrady7xwfrzszkk2fvq81ymv99mq474h60qnirk27khdygk24m")))) |
ddfddb0c | 876 | (build-system cmake-build-system) |
00dfc97c RW |
877 | (arguments |
878 | `(#:phases | |
879 | (modify-phases %standard-phases | |
880 | ;; Move SSE compiler optimization flags from generic target to | |
881 | ;; athlon64 and core2 targets, because otherwise the build would fail | |
882 | ;; on non-Intel machines. | |
883 | (add-after 'unpack 'remove-sse-flags-from-generic-target | |
884 | (lambda _ | |
885 | (substitute* "src/CMakeLists.txt" | |
886 | (("-msse -msse2 -mfpmath=sse") "") | |
887 | (("-march=(athlon64|core2)" flag) | |
888 | (string-append flag " -msse -msse2 -mfpmath=sse"))) | |
889 | #t))))) | |
ddfddb0c RW |
890 | (inputs |
891 | `(("liblo" ,liblo) | |
892 | ("ntk" ,ntk) | |
893 | ("alsa-lib" ,alsa-lib) | |
894 | ("jack" ,jack-1) | |
895 | ("fftw" ,fftw) | |
896 | ("minixml" ,minixml) | |
897 | ("libxpm" ,libxpm) | |
898 | ("zlib" ,zlib))) | |
899 | (native-inputs | |
900 | `(("pkg-config" ,pkg-config))) | |
901 | (home-page "http://zynaddsubfx.sf.net/") | |
902 | (synopsis "Software synthesizer") | |
903 | (description | |
904 | "ZynAddSubFX is a feature heavy realtime software synthesizer. It offers | |
905 | three synthesizer engines, multitimbral and polyphonic synths, microtonal | |
906 | capabilities, custom envelopes, effects, etc.") | |
907 | (license license:gpl2))) |