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