1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
3 ;;; Copyright © 2014, 2018 Efraim Flashner <efraim@flashner.co.il>
5 ;;; This file is part of GNU Guix.
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.
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.
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/>.
20 (define-module (gnu packages orpheus)
21 #:use-module (guix licenses)
22 #:use-module (guix packages)
23 #:use-module (guix download)
24 #:use-module (guix build-system gnu)
25 #:use-module (gnu packages)
26 #:use-module (gnu packages ncurses)
27 #:use-module (gnu packages mp3)
28 #:use-module (gnu packages base)
29 #:use-module (gnu packages xiph)
30 #:use-module (gnu packages xml)
31 #:use-module (ice-9 match))
33 (define-public orpheus
40 (uri (string-append "http://thekonst.net/download/orpheus-"
44 "1xbgxq8fybwhm51nw9hvvrgi873qzkc2qvmy15d2m2hw2yqa99hq"))
45 (patches (search-patches "orpheus-cast-errors-and-includes.patch"))))
46 (build-system gnu-build-system)
48 `(("ncurses" ,ncurses)
49 ("libvorbis" ,libvorbis)
50 ("vorbis-tools" ,vorbis-tools)
57 (modify-phases %standard-phases
59 (lambda* (#:key outputs #:allow-other-keys)
60 ;; This old `configure' script does not support variables passed as
62 (let ((out (assoc-ref outputs "out")))
63 (setenv "CONFIG_SHELL" (which "bash"))
64 (setenv "SHELL" (which "bash"))
65 (setenv "LIBS" "-logg") ;doesn't declare its use of libogg
67 (string-append "--prefix=" out)
68 ,@(match (%current-system)
70 '("--host=mips64el-unknown-linux-gnu"))
72 '("--build=aarch64-unknown-linux-gnu"))
74 (add-after 'configure 'configure-players
75 (lambda* (#:key inputs #:allow-other-keys)
76 ;; To avoid propagating the mpg321 and vorbis-tools inputs, we can
77 ;; make the orpheus application execute the needed players from the
79 (let ((ogg123 (string-append (assoc-ref inputs "vorbis-tools")
81 (mpg321 (string-append (assoc-ref inputs "mpg321")
83 (which (string-append (assoc-ref inputs "which")
85 (substitute* "src/orpheusconf.cc"
90 (add-before 'build 'patch-shells
92 (substitute* '("src/mp3track.cc"
95 (("/bin/sh") (which "sh")))
97 (home-page "http://thekonst.net/en/orpheus")
98 (synopsis "Text-mode audio player")
100 "Orpheus is a light-weight text mode menu- and window-driven audio player
101 application for CDs, internet stream broadcasts, and files in MP3 and Vorbis