From 4984cd4303ba59d07a672e226d54a9569d4770cd Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Sun, 1 Mar 2015 21:10:48 +0100 Subject: [PATCH] WIP: Add solfege --- gnu/packages/audio.scm | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm index 5a23618..6bb7ccc 100644 --- a/gnu/packages/audio.scm +++ b/gnu/packages/audio.scm @@ -35,12 +35,15 @@ #:use-module (gnu packages curl) #:use-module (gnu packages databases) #:use-module (gnu packages file) + #:use-module (gnu packages gettext) + #:use-module (gnu packages ghostscript) #:use-module (gnu packages glib) #:use-module (gnu packages gtk) #:use-module (gnu packages gnome) #:use-module (gnu packages ncurses) #:use-module (gnu packages qt) #:use-module (gnu packages linux) + #:use-module (gnu packages man) #:use-module (gnu packages mp3) ;taglib #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) @@ -48,6 +51,7 @@ #:use-module (gnu packages python) #:use-module (gnu packages rdf) #:use-module (gnu packages readline) + #:use-module (gnu packages texinfo) #:use-module (gnu packages which) #:use-module (gnu packages xiph) #:use-module (gnu packages xml) @@ -717,6 +721,66 @@ and ALSA.") tempo and pitch of an audio recording independently of one another.") (license license:gpl2+))) +(define-public solfege + (package + (name "solfege") + (version "3.22.2") + (source (origin + (method url-fetch) + (uri (string-append + "mirror://gnu/solfege/solfege-" + version ".tar.xz")) + (sha256 + (base32 + "1w25rxdbj907nsx285k9nm480pvy12w3yknfh4n1dfv17cwy072i")))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ; xmllint attempts to download DTD + #:test-target "test" + #:phases + (alist-cons-before + 'build 'patch-python-shebangs + (lambda _ + (substitute* (find-files "solfege" ".*\\.py") + (("#!/usr/bin/python") (string-append "#!" (which "python"))))) + (alist-cons-after + 'install 'wrap-program + (lambda* (#:key inputs outputs #:allow-other-keys) + ;; Make sure 'solfege' can import 'pygtk'. + (let* ((out (assoc-ref outputs "out")) + (pygtk (assoc-ref inputs "pygtk")) + (path (getenv "PYTHONPATH"))) + (wrap-program (string-append out "/bin/solfege") + `("PYTHONPATH" ":" prefix (,path + ;,(string-append pygtk "/lib/python2.7/site-packages/gtk-2.0") + ))))) + %standard-phases)))) + (inputs + `(("python" ,python-2) + ("pygtk" ,python2-pygtk) + ("gettext" ,gnu-gettext) + ("ghostscript" ,ghostscript) + ("gtk" ,gtk+) + ;("lilypond" ,lilypond) + )) + (native-inputs + `(("pkg-config" ,pkg-config) + ("txt2man" ,txt2man) + ("libxml2" ,libxml2) ; for tests + ("texinfo" ,texinfo))) + (home-page "https://www.gnu.org/software/solfege/") + (synopsis "Ear training") + (description + "GNU Solfege is a program for practicing musical ear-training. With it, +you can practice your recognition of various musical intervals and chords. It +features a statistics overview so you can monitor your progress across several +sessions. Solfege is also designed to be extensible so you can easily write +your own lessons.") + ;; Confusing: the README says "either version 2." but does not continue + ;; with the common "or (at your option) any later version", yet most of + ;; the file headers state GPLv3+. + (license license:gpl3+))) + (define-public sratom (package (name "sratom") -- 2.1.0