mpd.scm 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2014, 2015 David Thompson <dthompson2@worcester.edu>
  3. ;;; Copyright © 2014 Andreas Enge <andreas@enge.fr>
  4. ;;; Copyright © 2014 Cyrill Schenkel <cyrill.schenkel@gmail.com>
  5. ;;; Copyright © 2014 Ian Denhardt <ian@zenhack.net>
  6. ;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
  7. ;;; Copyright © 2016, 2018, 2019, 2020 Leo Famulari <leo@famulari.name>
  8. ;;; Copyright © 2018–2021 Tobias Geerinckx-Rice <me@tobias.gr>
  9. ;;; Copyright © 2019 Evan Straw <evan.straw99@gmail.com>
  10. ;;; Copyright © 2020 Ricardo Wurmus <rekado@elephly.net>
  11. ;;; Copyright © 2020 Lars-Dominik Braun <lars@6xq.net>
  12. ;;; Copyright © 2020, 2021 Simon Streit <simon@netpanic.org>
  13. ;;; Copyright © 2021 Noah Evans <noah@nevans.me>
  14. ;;;
  15. ;;; This file is part of GNU Guix.
  16. ;;;
  17. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  18. ;;; under the terms of the GNU General Public License as published by
  19. ;;; the Free Software Foundation; either version 3 of the License, or (at
  20. ;;; your option) any later version.
  21. ;;;
  22. ;;; GNU Guix is distributed in the hope that it will be useful, but
  23. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  24. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  25. ;;; GNU General Public License for more details.
  26. ;;;
  27. ;;; You should have received a copy of the GNU General Public License
  28. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  29. (define-module (gnu packages mpd)
  30. #:use-module (gnu packages)
  31. #:use-module ((guix licenses) #:prefix license:)
  32. #:use-module (guix packages)
  33. #:use-module (guix download)
  34. #:use-module (guix git-download)
  35. #:use-module (guix utils)
  36. #:use-module (guix build-system cmake)
  37. #:use-module (guix build-system gnu)
  38. #:use-module (guix build-system meson)
  39. #:use-module (guix build-system python)
  40. #:use-module (gnu packages audio)
  41. #:use-module (gnu packages autotools)
  42. #:use-module (gnu packages avahi)
  43. #:use-module (gnu packages base)
  44. #:use-module (gnu packages boost)
  45. #:use-module (gnu packages cdrom)
  46. #:use-module (gnu packages gettext)
  47. #:use-module (gnu packages gnome)
  48. #:use-module (gnu packages gnupg)
  49. #:use-module (gnu packages gtk)
  50. #:use-module (gnu packages icu4c)
  51. #:use-module (gnu packages libusb)
  52. #:use-module (gnu packages readline)
  53. #:use-module (gnu packages check)
  54. #:use-module (gnu packages compression)
  55. #:use-module (gnu packages curl)
  56. #:use-module (gnu packages documentation)
  57. #:use-module (gnu packages glib)
  58. #:use-module (gnu packages linux)
  59. #:use-module (gnu packages mp3)
  60. #:use-module (gnu packages ncurses)
  61. #:use-module (gnu packages pcre)
  62. #:use-module (gnu packages pkg-config)
  63. #:use-module (gnu packages python)
  64. #:use-module (gnu packages python-xyz)
  65. #:use-module (gnu packages pulseaudio)
  66. #:use-module (gnu packages qt)
  67. #:use-module (gnu packages sphinx)
  68. #:use-module (gnu packages sqlite)
  69. #:use-module (gnu packages video)
  70. #:use-module (gnu packages xiph))
  71. (define-public libmpdclient
  72. (package
  73. (name "libmpdclient")
  74. (version "2.19")
  75. (source (origin
  76. (method url-fetch)
  77. (uri
  78. (string-append "https://musicpd.org/download/libmpdclient/"
  79. (car (string-split version #\.))
  80. "/libmpdclient-" version ".tar.xz"))
  81. (sha256
  82. (base32
  83. "12d1fzlkcnjw4ayk2wp11vhglfcvr5k02arzdbkhiavq496av2hm"))))
  84. (build-system meson-build-system)
  85. (native-inputs
  86. `(("pkg-config" ,pkg-config)
  87. ;; For building HTML documentation.
  88. ("doxygen" ,doxygen)
  89. ;; For tests.
  90. ("check" ,check)))
  91. (arguments
  92. `(#:configure-flags
  93. (list "-Ddocumentation=true"
  94. "-Dtest=true")))
  95. (synopsis "Music Player Daemon client library")
  96. (description "A stable, documented, asynchronous API library for
  97. interfacing MPD in the C, C++ & Objective C languages.")
  98. (home-page "https://www.musicpd.org/libs/libmpdclient/")
  99. (license license:bsd-3)))
  100. (define-public mpd
  101. (package
  102. (name "mpd")
  103. (version "0.22.10")
  104. (source (origin
  105. (method url-fetch)
  106. (uri
  107. (string-append "https://musicpd.org/download/mpd/"
  108. (version-major+minor version)
  109. "/mpd-" version ".tar.xz"))
  110. (sha256
  111. (base32
  112. "0576z57rgwmnm5djd7rwbc93aikji0n6b3lx1553v74rx4sjbj07"))))
  113. (build-system meson-build-system)
  114. (arguments
  115. `(#:configure-flags '("-Ddocumentation=enabled")))
  116. (inputs `(("ao" ,ao)
  117. ("alsa-lib" ,alsa-lib)
  118. ("avahi" ,avahi)
  119. ("boost" ,boost)
  120. ("curl" ,curl)
  121. ("ffmpeg" ,ffmpeg)
  122. ("flac" ,flac)
  123. ("glib" ,glib)
  124. ("icu4c" ,icu4c)
  125. ;; The LAME decoder comes from FFmpeg, but is added here so that
  126. ;; configure picks up the LAME encoder.
  127. ("lame" ,lame)
  128. ("libid3tag" ,libid3tag)
  129. ("libmpdclient" ,libmpdclient)
  130. ("libsamplerate" ,libsamplerate)
  131. ("libsndfile" ,libsndfile)
  132. ("libvorbis" ,libvorbis)
  133. ("opus" ,opus)
  134. ("pulseaudio" ,pulseaudio)
  135. ("sqlite" ,sqlite)
  136. ("zlib" ,zlib)))
  137. (native-inputs `(("pkg-config" ,pkg-config)
  138. ("python-sphinx" ,python-sphinx)))
  139. ;; Missing optional inputs:
  140. ;; libyajl
  141. ;; libcdio_paranoia
  142. ;; libmms
  143. ;; libadplug
  144. ;; libaudiofile
  145. ;; faad2
  146. ;; fluidsynth
  147. ;; libgme
  148. ;; libshout
  149. ;; libmpg123
  150. ;; libmodplug
  151. ;; libmpcdec
  152. ;; libsidplay2
  153. ;; libwavpack
  154. ;; libwildmidi
  155. ;; libtwolame
  156. ;; libroar
  157. ;; libjack
  158. ;; OpenAL
  159. (synopsis "Music Player Daemon")
  160. (description "Music Player Daemon (MPD) is a flexible, powerful,
  161. server-side application for playing music. Through plugins and libraries it
  162. can play a variety of sound files while being controlled by its network
  163. protocol.")
  164. (home-page "https://www.musicpd.org/")
  165. (license license:gpl2)))
  166. (define-public mpd-mpc
  167. (package
  168. (name "mpd-mpc")
  169. (version "0.33")
  170. (source (origin
  171. (method url-fetch)
  172. (uri
  173. (string-append "https://www.musicpd.org/download/mpc/"
  174. (car (string-split version #\.))
  175. "/mpc-" version ".tar.xz"))
  176. (sha256
  177. (base32
  178. "15hjpzqs83v1zx49x8nkpwy9hpl1jxd55z1w50vm82gm32zcqh2g"))))
  179. (build-system meson-build-system)
  180. (inputs `(("libmpdclient" ,libmpdclient)))
  181. (native-inputs
  182. `(("pkg-config" ,pkg-config)
  183. ("python-sphinx" ,python-sphinx)))
  184. (synopsis "Music Player Daemon client")
  185. (description "MPC is a minimalist command line interface to MPD, the music
  186. player daemon.")
  187. (home-page "https://www.musicpd.org/clients/mpc/")
  188. (license license:gpl2)))
  189. (define-public ncmpc
  190. (package
  191. (name "ncmpc")
  192. (version "0.45")
  193. (source (origin
  194. (method url-fetch)
  195. (uri
  196. (string-append "http://musicpd.org/download/ncmpc/"
  197. (version-major version)
  198. "/ncmpc-" version ".tar.xz"))
  199. (sha256
  200. (base32
  201. "11gpy6kd7xr8x7f7gwdwfryxyc58cd135ds28gnz40p08xj49zqp"))))
  202. (build-system meson-build-system)
  203. (arguments
  204. `(#:configure-flags
  205. ;; Otherwise, they are installed incorrectly, in
  206. ;; '$out/share/man/man/man1'.
  207. (list (string-append "-Dmandir=" (assoc-ref %outputs "out")
  208. "/share"))))
  209. (inputs `(("boost" ,boost)
  210. ("pcre" ,pcre)
  211. ("libmpdclient" ,libmpdclient)
  212. ("ncurses" ,ncurses)))
  213. (native-inputs `(("gettext" ,gettext-minimal) ; for xgettext
  214. ("pkg-config" ,pkg-config)
  215. ("python-sphinx" ,python-sphinx)))
  216. (synopsis "Curses Music Player Daemon client")
  217. (description "ncmpc is a fully featured MPD client, which runs in a
  218. terminal using ncurses.")
  219. (home-page "https://www.musicpd.org/clients/ncmpc/")
  220. (license license:gpl2)))
  221. (define-public ncmpcpp
  222. (package
  223. (name "ncmpcpp")
  224. (version "0.9.2")
  225. (source (origin
  226. (method url-fetch)
  227. (uri
  228. (string-append "https://ncmpcpp.rybczak.net/stable/ncmpcpp-"
  229. version ".tar.bz2"))
  230. (sha256
  231. (base32
  232. "06rs734n120jp51hr0fkkhxrm7zscbhpdwls0m5b5cccghazdazs"))))
  233. (build-system gnu-build-system)
  234. (inputs `(("libmpdclient" ,libmpdclient)
  235. ("boost" ,boost)
  236. ("readline" ,readline)
  237. ("ncurses" ,ncurses)
  238. ("taglib" ,taglib)
  239. ("icu4c" ,icu4c)
  240. ("curl" ,curl)))
  241. (native-inputs
  242. `(("pkg-config" ,pkg-config)))
  243. (arguments
  244. '(#:configure-flags
  245. '("BOOST_LIB_SUFFIX=" "--with-taglib" "--enable-clock")))
  246. (synopsis "Featureful ncurses based MPD client inspired by ncmpc")
  247. (description "Ncmpcpp is an mpd client with a UI very similar to ncmpc,
  248. but it provides new useful features such as support for regular expressions
  249. for library searches, extended song format, items filtering, the ability to
  250. sort playlists, and a local file system browser.")
  251. (home-page "https://ncmpcpp.rybczak.net/")
  252. (license license:gpl2+)))
  253. (define-public mpdscribble
  254. (package
  255. (name "mpdscribble")
  256. (version "0.23")
  257. (source (origin
  258. (method url-fetch)
  259. (uri (string-append "http://www.musicpd.org/download/mpdscribble/"
  260. version "/mpdscribble-" version ".tar.xz"))
  261. (sha256
  262. (base32
  263. "0s66zqscb44p88cl3kcv5jkjcqsskcnrv7xgrjhzrchf2kcpwf53"))))
  264. (build-system meson-build-system)
  265. (inputs `(("boost" ,boost)
  266. ("curl" ,curl)
  267. ("libgcrypt" ,libgcrypt)
  268. ("libmpdclient" ,libmpdclient)))
  269. (native-inputs `(("pkg-config" ,pkg-config)))
  270. (synopsis "MPD client for track scrobbling")
  271. (description "mpdscribble is a Music Player Daemon client which submits
  272. information about tracks being played to a scrobbler, such as Libre.FM.")
  273. (home-page "https://www.musicpd.org/clients/mpdscribble/")
  274. (license license:gpl2+)))
  275. (define-public python-mpd2
  276. (package
  277. (name "python-mpd2")
  278. (version "3.0.4")
  279. (source (origin
  280. (method url-fetch)
  281. (uri (pypi-uri "python-mpd2" version))
  282. (sha256
  283. (base32
  284. "1r8saq1460yfa0sxfrvxqs2r453wz2xchlc9gzbpqznr49786rvs"))))
  285. (build-system python-build-system)
  286. (arguments
  287. '(#:phases
  288. (modify-phases %standard-phases
  289. (replace 'check
  290. (lambda _ (invoke "python" "-m" "pytest" "mpd/tests.py"))))))
  291. (native-inputs
  292. `(("python-mock" ,python-mock)
  293. ("python-pytest" ,python-pytest)))
  294. (home-page "https://github.com/Mic92/python-mpd2")
  295. (synopsis "Python MPD client library")
  296. (description "Python-mpd2 is a Python library which provides a client
  297. interface for the Music Player Daemon.")
  298. (license license:lgpl3+)))
  299. (define-public sonata
  300. (package
  301. (name "sonata")
  302. (version "1.7.0")
  303. (source (origin
  304. (method git-fetch)
  305. (uri (git-reference
  306. (url "https://github.com/multani/sonata")
  307. (commit (string-append "v" version))))
  308. (file-name (git-file-name name version))
  309. (sha256
  310. (base32
  311. "0rl8w7s2asff626clzfvyz987l2k4ml5dg417mqp9v8a962q0v2x"))))
  312. (build-system python-build-system)
  313. (arguments
  314. `(#:modules ((guix build gnu-build-system)
  315. (guix build python-build-system)
  316. ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
  317. (guix build utils))
  318. #:imported-modules (,@%gnu-build-system-modules
  319. (guix build python-build-system)
  320. (guix build glib-or-gtk-build-system))
  321. #:phases
  322. (modify-phases %standard-phases
  323. (add-after 'install 'glib-or-gtk-wrap
  324. (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap))
  325. (add-after 'install 'wrap-sonata
  326. (lambda* (#:key outputs #:allow-other-keys)
  327. (let ((out (assoc-ref outputs "out"))
  328. (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
  329. (wrap-program (string-append out "/bin/sonata")
  330. `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))
  331. #t)))))
  332. (native-inputs
  333. `(("gettext" ,gettext-minimal)))
  334. (inputs
  335. `(("python-mpd2" ,python-mpd2)
  336. ("gtk+" ,gtk+)
  337. ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
  338. ("gobject-introspection" ,gobject-introspection)
  339. ("adwaita-icon-theme" ,adwaita-icon-theme)
  340. ("python-pygobject" ,python-pygobject)))
  341. (synopsis "Elegant client for the Music Player Daemon")
  342. (description "Sonata is an elegant graphical client for the Music Player
  343. Daemon (MPD). It supports playlists, multiple profiles (connecting to different
  344. MPD servers, search and multimedia key support.")
  345. (home-page "https://www.nongnu.org/sonata/")
  346. (license license:gpl3+)))
  347. (define-public ashuffle
  348. (package
  349. (name "ashuffle")
  350. (version "2.0.2")
  351. (source (origin
  352. (method git-fetch)
  353. (uri (git-reference
  354. (url "https://github.com/joshkunz/ashuffle")
  355. (commit (string-append "v" version))))
  356. (file-name (git-file-name name version))
  357. (sha256
  358. (base32
  359. "11aa95cg0yca2m2d00sar6wr14g3lc7cfm9bin1h7lk7asdm8azp"))))
  360. (native-inputs `(("pkg-config" ,pkg-config)))
  361. (inputs `(("libmpdclient" ,libmpdclient)))
  362. (build-system meson-build-system)
  363. (home-page "https://github.com/joshkunz/ashuffle")
  364. (synopsis "Automatic library-wide shuffle for mpd")
  365. (description "ashuffle is an application for automatically shuffling your
  366. MPD library in a similar way to many other music players' 'shuffle library'
  367. feature. ashuffle works like any other MPD client, and can be used alongside
  368. other MPD frontends.")
  369. (license license:expat)))
  370. (define-public mpdris2
  371. (package
  372. (name "mpdris2")
  373. (version "0.9.1")
  374. (source (origin
  375. (method git-fetch)
  376. (uri (git-reference
  377. (url "https://github.com/eonpatapon/mpDris2")
  378. (commit version)))
  379. (file-name (git-file-name name version))
  380. (sha256
  381. (base32
  382. "17ys8ccr3h6vix0agvhz859slz0phhk7lwqn5bg4az8s7zgqm3nm"))))
  383. (build-system gnu-build-system)
  384. ;; Manually wrap the binary, because we’re not using python-build-system.
  385. (arguments
  386. '(#:phases
  387. (modify-phases %standard-phases
  388. (add-after 'install 'wrap-program
  389. (lambda* (#:key inputs outputs #:allow-other-keys)
  390. (let ((out (assoc-ref outputs "out"))
  391. (python-path (getenv "GUIX_PYTHONPATH")))
  392. (wrap-program (string-append out "/bin/mpDris2")
  393. `("GUIX_PYTHONPATH" ":" prefix (,python-path)))
  394. #t))))))
  395. (inputs
  396. `(("python-mpd2" ,python-mpd2)
  397. ("python-dbus" ,python-dbus)
  398. ("python-pygobject" ,python-pygobject)
  399. ("python" ,python))) ; Sets GUIX_PYTHONPATH.
  400. ;; For bootstrapping.
  401. (native-inputs
  402. `(("autoconf" ,autoconf)
  403. ("automake" ,automake)
  404. ("gettext" ,gettext-minimal)
  405. ("which" ,which)
  406. ("intltool" ,intltool)))
  407. (synopsis "MPRIS V2.1 support for MPD")
  408. (description "Client for the Music Player Daemon providing MPRIS 2
  409. support")
  410. (home-page "https://github.com/eonpatapon/mpDris2")
  411. (license license:gpl3+)))
  412. (define-public cantata
  413. (package
  414. (name "cantata")
  415. (version "2.4.2")
  416. (source (origin
  417. (method url-fetch)
  418. (uri (string-append "https://github.com/CDrummond/"
  419. "cantata/releases/download/v" version "/"
  420. "cantata-" version ".tar.bz2"))
  421. (sha256
  422. (base32
  423. "10pcrpmb4n1mkgr21xd580nrbmh57q7s72cbs1zay847hc65vliy"))))
  424. (build-system cmake-build-system)
  425. (arguments
  426. `(#:tests? #f)) ; No test suite
  427. (native-inputs
  428. `(("pkg-config" ,pkg-config)))
  429. (inputs
  430. `(("eudev" ,eudev)
  431. ("ffmpeg" ,ffmpeg)
  432. ("libcdio-paranoia" ,libcdio-paranoia)
  433. ("libebur128" ,libebur128)
  434. ("libmtp" ,libmtp)
  435. ("mpg123" ,mpg123)
  436. ("qtbase" ,qtbase-5)
  437. ("qtmultimedia" ,qtmultimedia)
  438. ("qtsvg" ,qtsvg)
  439. ("taglib" ,taglib)
  440. ("zlib" ,zlib)))
  441. (synopsis "Graphical MPD Client")
  442. (description "Cantata is a graphical client for the Music Player Daemon
  443. (MPD), using the Qt5 toolkit. Its user interface is highly customizable,
  444. supporting multiple collections, ratings, and dynamic playlists. A local cache
  445. of the music library will be created to provide a hierarchy of albums and
  446. artists along with albumart.")
  447. (home-page "https://github.com/cdrummond/cantata")
  448. (license license:gpl3+)))
  449. (define-public mcg
  450. (package
  451. (name "mcg")
  452. (version "2.1.2")
  453. (source
  454. (origin
  455. (method git-fetch)
  456. (uri
  457. (git-reference
  458. (url "https://gitlab.com/coderkun/mcg")
  459. (commit (string-append "v" version))))
  460. (file-name (git-file-name name version))
  461. (sha256
  462. (base32
  463. "01iqxydssxyi4s644dwl64vm7xhn0szd99hdpywbipvb7kwp5196"))))
  464. (build-system python-build-system)
  465. (native-inputs
  466. `(("glib:bin" ,glib "bin")
  467. ("gobject-introspection" ,gobject-introspection)
  468. ("pkg-config" ,pkg-config)))
  469. (inputs
  470. `(("avahi" ,avahi)
  471. ("dconf" ,dconf)
  472. ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
  473. ("gtk+" ,gtk+)
  474. ("python-pygobject" ,python-pygobject)))
  475. (arguments
  476. `(#:imported-modules ((guix build glib-or-gtk-build-system)
  477. ,@%python-build-system-modules)
  478. #:modules ((guix build python-build-system)
  479. ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
  480. (guix build utils))
  481. #:phases
  482. (modify-phases %standard-phases
  483. (add-after 'install 'wrap-program
  484. (lambda* (#:key outputs #:allow-other-keys)
  485. (let ((prog (string-append (assoc-ref outputs "out")
  486. "/bin/mcg")))
  487. (wrap-program prog
  488. `("PYTHONPATH" = (,(getenv "PYTHONPATH")))
  489. `("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH"))))
  490. #t)))
  491. (add-after 'wrap-program 'glib-or-gtk-wrap
  492. (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap)))))
  493. (synopsis "Covergrid for the MPD")
  494. (description
  495. "mcg (CoverGrid) is a client for the Music Player Daemon (MPD), focusing
  496. on albums instead of single tracks. It is not intended to be a replacement
  497. for your favorite MPD client but an addition to get a better
  498. album-experience.")
  499. (home-page "https://gitlab.com/coderkun/mcg")
  500. (license license:gpl3+)))