gnu: emacs-svg-icon: Fix grammar.
[jackhill/guix/guix.git] / gnu / packages / kodi.scm
CommitLineData
34f5618b
DT
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2015 David Thompson <davet@gnu.org>
b165fe61 3;;; Copyright © 2017, 2019 Marius Bakke <mbakke@fastmail.com>
72df48db 4;;; Copyright © 2017 Oleg Pykhalov <go.wigust@gmail.com>
cf0ea815 5;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
c743a918 6;;; Copyright © 2018, 2020 Efraim Flashner <efraim@flashner.co.il>
1893c80f 7;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
34f5618b
DT
8;;;
9;;; This file is part of GNU Guix.
10;;;
11;;; GNU Guix is free software; you can redistribute it and/or modify it
12;;; under the terms of the GNU General Public License as published by
13;;; the Free Software Foundation; either version 3 of the License, or (at
14;;; your option) any later version.
15;;;
16;;; GNU Guix is distributed in the hope that it will be useful, but
17;;; WITHOUT ANY WARRANTY; without even the implied warranty of
18;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19;;; GNU General Public License for more details.
20;;;
21;;; You should have received a copy of the GNU General Public License
22;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
23
24(define-module (gnu packages kodi)
25 #:use-module ((guix licenses) #:prefix license:)
26 #:use-module (guix utils)
27 #:use-module (guix packages)
28 #:use-module (guix download)
1e3fbf3c 29 #:use-module (guix git-download)
f69e2034 30 #:use-module (guix build-system cmake)
34f5618b 31 #:use-module (guix build-system gnu)
72df48db 32 #:use-module (guix build-system trivial)
39ad752c 33 #:use-module (gnu packages)
34f5618b
DT
34 #:use-module (gnu packages algebra)
35 #:use-module (gnu packages audio)
36 #:use-module (gnu packages autotools)
37 #:use-module (gnu packages avahi)
38 #:use-module (gnu packages base)
72df48db 39 #:use-module (gnu packages bash)
34f5618b
DT
40 #:use-module (gnu packages cdrom)
41 #:use-module (gnu packages cmake)
42 #:use-module (gnu packages compression)
43 #:use-module (gnu packages curl)
44 #:use-module (gnu packages databases)
99828fa7 45 #:use-module (gnu packages documentation)
1893c80f 46 #:use-module (gnu packages file-systems)
34f5618b 47 #:use-module (gnu packages fontutils)
b165fe61 48 #:use-module (gnu packages freedesktop)
34f5618b
DT
49 #:use-module (gnu packages fribidi)
50 #:use-module (gnu packages gettext)
51 #:use-module (gnu packages ghostscript)
52 #:use-module (gnu packages gawk)
53 #:use-module (gnu packages gl)
54 #:use-module (gnu packages glib)
55 #:use-module (gnu packages gperf)
988b78ba 56 #:use-module (gnu packages groff)
34f5618b
DT
57 #:use-module (gnu packages gnunet)
58 #:use-module (gnu packages gnupg)
59 #:use-module (gnu packages image)
60 #:use-module (gnu packages java)
61 #:use-module (gnu packages libusb)
62 #:use-module (gnu packages linux)
63 #:use-module (gnu packages mp3)
64 #:use-module (gnu packages pcre)
65 #:use-module (gnu packages pkg-config)
f69e2034 66 #:use-module (gnu packages pretty-print)
34f5618b
DT
67 #:use-module (gnu packages pulseaudio)
68 #:use-module (gnu packages python)
69 #:use-module (gnu packages samba)
70 #:use-module (gnu packages sdl)
e3407254 71 #:use-module (gnu packages serialization)
cd0322a3 72 #:use-module (gnu packages sqlite)
34f5618b
DT
73 #:use-module (gnu packages ssh)
74 #:use-module (gnu packages swig)
75 #:use-module (gnu packages textutils)
76 #:use-module (gnu packages tls)
77 #:use-module (gnu packages video)
78 #:use-module (gnu packages web)
79 #:use-module (gnu packages xdisorg)
80 #:use-module (gnu packages xiph)
81 #:use-module (gnu packages xml)
82 #:use-module (gnu packages xorg)
148585c2 83 #:use-module (gnu packages assembly))
34f5618b 84
1e3fbf3c 85(define-public crossguid
e3407254
EF
86 (let ((commit "fef89a4174a7bf8cd99fa9154864ce9e8e3bf989")
87 (revision "2"))
1e3fbf3c
DT
88 (package
89 (name "crossguid")
e3407254
EF
90 (version (string-append "0.0-" revision "." (string-take commit 7)))
91 ;; This is the commit that Kodi wants.
1e3fbf3c
DT
92 (source (origin
93 (method git-fetch)
94 (uri (git-reference
b0e7b699 95 (url "https://github.com/graeme-hill/crossguid")
1e3fbf3c 96 (commit commit)))
7c776ddc 97 (file-name (string-append name "-" version "-checkout"))
1e3fbf3c
DT
98 (sha256
99 (base32
e3407254 100 "1blrkc7zcqrqcr5msvhyhm98s2jvm9hr0isqs4288q2r4mdnrfq0"))))
1e3fbf3c
DT
101 (build-system gnu-build-system)
102 (arguments
103 '(#:phases
104 (modify-phases %standard-phases
2aa137e2 105 (delete 'configure) ; no configure script
1e3fbf3c
DT
106 (replace 'build
107 (lambda _
2aa137e2 108 (invoke "g++" "-c" "guid.cpp" "-o" "guid.o"
0fe041bd 109 "-DGUID_LIBUUID")
2aa137e2 110 (invoke "ar" "rvs" "libcrossguid.a" "guid.o")))
1e3fbf3c
DT
111 (replace 'check
112 (lambda _
0fe041bd
MB
113 (invoke "g++" "-c" "test.cpp" "-o" "test.o")
114 (invoke "g++" "-c" "testmain.cpp" "-o" "testmain.o")
2aa137e2
TGR
115 (invoke "g++" "test.o" "guid.o" "testmain.o"
116 "-o" "test" "-luuid")
117 (invoke (string-append (getcwd) "/test"))))
1e3fbf3c
DT
118 (replace 'install
119 (lambda* (#:key outputs #:allow-other-keys)
120 (let ((out (assoc-ref outputs "out")))
121 (install-file "guid.h" (string-append out "/include"))
122 (install-file "libcrossguid.a"
123 (string-append out "/lib"))
124 #t))))))
125 (inputs
bb93042c 126 `(("libuuid" ,util-linux "lib")))
1e3fbf3c 127 (synopsis "Lightweight universal identifier library")
7c49ab5b 128 (description "CrossGuid is a minimal GUID/UUID
1e3fbf3c
DT
129generator library for C++.")
130 (home-page "https://github.com/graeme-hill/crossguid")
131 (license license:expat))))
132
f69e2034
MB
133;; Kodi requires using their own special forks of these libraries.
134;; In addition, it insists on downloading and building these as part
135;; of the standard build process. To make things easier, we bootstrap
136;; and patch shebangs here, so we don't have to worry about it later.
137(define libdvdnav/kodi
e3407254 138 (let ((commit "6.0.0-Leia-Alpha-3"))
f69e2034
MB
139 (package
140 (name "libdvdnav-bootstrapped")
141 (version commit)
142 (source (origin
143 (method git-fetch)
144 (uri (git-reference
b0e7b699 145 (url "https://github.com/xbmc/libdvdnav")
f69e2034
MB
146 (commit commit)))
147 (file-name (string-append name "-" version "-checkout"))
148 (sha256
149 (base32
e3407254 150 "0qwlf4lgahxqxk1r2pzl866mi03pbp7l1fc0rk522sc0ak2s9jhb"))))
f69e2034
MB
151 (build-system gnu-build-system)
152 (arguments
153 '(#:tests? #f
154 #:phases
155 (modify-phases %standard-phases
f69e2034
MB
156 (delete 'configure)
157 (delete 'build)
158 (replace 'install
159 (lambda* (#:key outputs #:allow-other-keys)
160 (copy-recursively "." (assoc-ref outputs "out"))
161 #t)))))
162 (native-inputs
163 `(("autoconf" ,autoconf)
164 ("automake" ,automake)
165 ("libtool" ,libtool)
166 ("pkg-config" ,pkg-config)))
167 (home-page "https://github.com/xbmc/libdvdnav")
168 (synopsis (package-synopsis libdvdnav))
169 (description (package-description libdvdnav))
170 (license license:gpl2+))))
171
172(define libdvdread/kodi
e3407254 173 (let ((commit "6.0.0-Leia-Alpha-3"))
f69e2034
MB
174 (package
175 (name "libdvdread-bootstrapped")
176 (version commit)
177 (source (origin
178 (method git-fetch)
179 (uri (git-reference
b0e7b699 180 (url "https://github.com/xbmc/libdvdread")
f69e2034
MB
181 (commit commit)))
182 (file-name (string-append name "-" version "-checkout"))
183 (sha256
184 (base32
e3407254 185 "1xxn01mhkdnp10cqdr357wx77vyzfb5glqpqyg8m0skyi75aii59"))))
f69e2034
MB
186 (build-system gnu-build-system)
187 (arguments
188 '(#:tests? #f
189 #:phases
190 (modify-phases %standard-phases
f69e2034
MB
191 (delete 'configure)
192 (delete 'build)
193 (replace 'install
194 (lambda* (#:key outputs #:allow-other-keys)
195 (copy-recursively "." (assoc-ref outputs "out"))
196 #t)))))
197 (native-inputs
198 `(("autoconf" ,autoconf)
199 ("automake" ,automake)
200 ("libtool" ,libtool)
201 ("pkg-config" ,pkg-config)))
202 (home-page "https://github.com/xbmc/libdvdread")
203 (synopsis (package-synopsis libdvdread))
204 (description (package-description libdvdread))
205 (license (list license:gpl2+ license:lgpl2.1+)))))
206
207(define libdvdcss/kodi
e3407254 208 (let ((commit "1.4.2-Leia-Beta-5"))
f69e2034
MB
209 (package
210 (name "libdvdcss-bootstrapped")
211 (version commit)
212 (source (origin
213 (method git-fetch)
214 (uri (git-reference
b0e7b699 215 (url "https://github.com/xbmc/libdvdcss")
f69e2034
MB
216 (commit commit)))
217 (file-name (string-append name "-" version "-checkout"))
218 (sha256
219 (base32
e3407254 220 "0j41ydzx0imaix069s3z07xqw9q95k7llh06fc27dcn6f7b8ydyl"))))
f69e2034
MB
221 (build-system gnu-build-system)
222 (arguments
223 '(#:tests? #f
224 #:phases
225 (modify-phases %standard-phases
f69e2034
MB
226 (delete 'configure)
227 (delete 'build)
228 (replace 'install
229 (lambda* (#:key outputs #:allow-other-keys)
230 (copy-recursively "." (assoc-ref outputs "out"))
231 #t)))))
232 (native-inputs
233 `(("autoconf" ,autoconf)
234 ("automake" ,automake)
235 ("libtool" ,libtool)
236 ("pkg-config" ,pkg-config)))
237 (home-page "https://github.com/xbmc/libdvdcss")
238 (synopsis (package-synopsis libdvdcss))
239 (description (package-description libdvdcss))
240 (license license:gpl2+))))
241
988b78ba
EF
242(define-public fstrcmp
243 (package
244 (name "fstrcmp")
245 (version "0.7.D001")
246 (source
247 (origin
248 (method url-fetch)
249 (uri (string-append "http://fstrcmp.sourceforge.net/fstrcmp-"
250 version ".tar.gz"))
251 (sha256
252 (base32
253 "0xilghiy3mz78bjmfldi39qyy7jvw5b6wafsx370lw401y2qw0g4"))))
254 (build-system gnu-build-system)
255 (home-page "http://fstrcmp.sourceforge.net/")
256 (arguments
257 '(#:configure-flags '("SH=sh")))
258 (native-inputs
259 `(("ghostscript" ,ghostscript) ; ps2pdf
260 ("groff" ,groff)
261 ("libtool" ,libtool)
262 ("which" ,which)))
263 (synopsis "fuzzy comparison of strings")
264 (description
265 "The fstrcmp project provides a library that is used to make fuzzy
266comparisons of strings and byte arrays, including multi-byte character strings.
267This can be useful in error messages, enabling the suggestion of likely valid
268alternatives. In compilers, this can reduce the cascade of secondary errors.")
269 (license license:gpl3+)))
270
34f5618b
DT
271(define-public kodi
272 (package
273 (name "kodi")
7ed31949 274 (version "18.8")
34f5618b 275 (source (origin
f69e2034
MB
276 (method git-fetch)
277 (uri (git-reference
b0e7b699 278 (url "https://github.com/xbmc/xbmc")
e3407254 279 (commit (string-append version "-Leia"))))
9d2749f6 280 (file-name (git-file-name name version))
34f5618b
DT
281 (sha256
282 (base32
7ed31949 283 "0qpkpz43s207msvv3qkiy6vzqwcgmydxv3py7vc29mv6h30chrva"))
3e4e74c1 284 (patches (search-patches "kodi-skip-test-449.patch"
f19e571c 285 "kodi-increase-test-timeout.patch"
3e4e74c1 286 "kodi-set-libcurl-ssl-parameters.patch"))
34f5618b 287 (snippet
34f5618b
DT
288 '(begin
289 (use-modules (guix build utils))
f69e2034 290 (for-each delete-file-recursively
e3407254 291 '("project/BuildDependencies/"
f69e2034
MB
292 ;; TODO: Purge these jars.
293 ;;"tools/codegenerator/groovy"
294 ;; And these sources:
295 ;; "tools/depend/native/JsonSchemaBuilder"
296 ;; "tools/depend/native/TexturePacker"
f69e2034
MB
297 ;; "lib/gtest"
298 ;; "lib/cpluff"
f69e2034
MB
299 ;; "lib/libUPnP"
300 "lib/libUPnP/Neptune/ThirdParty"
301 "project/Win32BuildSetup/tools/7z"))
302 #t))
34f5618b 303 (modules '((guix build utils)))))
f69e2034 304 (build-system cmake-build-system)
34f5618b 305 (arguments
f69e2034
MB
306 '(#:modules ((srfi srfi-1)
307 (guix build cmake-build-system)
308 (guix build utils))
309 #:configure-flags
310 (list "-DENABLE_INTERNAL_FFMPEG=OFF"
311 "-DENABLE_INTERNAL_CROSSGUID=OFF"
312 (string-append "-Dlibdvdread_URL="
313 (assoc-ref %build-inputs "libdvdread-bootstrapped"))
314 (string-append "-Dlibdvdnav_URL="
315 (assoc-ref %build-inputs "libdvdnav-bootstrapped"))
316 (string-append "-Dlibdvdcss_URL="
317 (assoc-ref %build-inputs "libdvdcss-bootstrapped"))
4951d2f3 318 (string-append "-DSYSTEM_LDFLAGS=-Wl,-rpath="
4ec1f82c 319 (assoc-ref %build-inputs "curl") "/lib"))
34f5618b
DT
320 #:phases
321 (modify-phases %standard-phases
f69e2034
MB
322 ;; The build system tries to bootstrap these bundled components
323 ;; during the regular build phase, which causes serious issues
34f5618b
DT
324 ;; because there's no time for shebangs to be patched. So, we
325 ;; bootstrap it on our own instead.
f69e2034
MB
326 (add-after 'unpack 'bootstrap-bundled-software
327 (lambda _
328 (let ((dirs '("tools/depends/native/JsonSchemaBuilder/src"
329 "lib/cpluff")))
330 (every (lambda (third-party)
331 (with-directory-excursion third-party
93ab9a5d 332 (invoke "autoreconf" "-vif")))
f69e2034
MB
333 dirs))))
334 (add-after 'bootstrap-bundled-software 'patch-stuff
8c011737 335 (lambda* (#:key inputs #:allow-other-keys)
f69e2034
MB
336 ;; Prevent the build scripts from calling autoreconf in the
337 ;; build stage. Otherwise, it would undo the bootstrapping
338 ;; and shebang patching that we worked so hard for.
339 (substitute* "cmake/modules/FindCpluff.cmake"
340 (("autoreconf -vif") "true"))
341 (substitute* "lib/cpluff/po/Makefile.in.in"
342 (("/bin/sh") (which "sh")))
343 (substitute* "cmake/modules/FindLibDvd.cmake"
344 ;; The libdvd* sources that we bootstrapped separately are
345 ;; unpacked in the build phase. This is our best opportunity
346 ;; to make them writable before the build process starts.
347 (("autoreconf -vif") "chmod -R u+w ."))
348
9d2749f6 349 (substitute* "xbmc/platform/linux/LinuxTimezone.cpp"
8c011737
MB
350 (("/usr/share/zoneinfo")
351 (string-append (assoc-ref inputs "tzdata")
352 "/share/zoneinfo")))
353
cbb5d2e1
EF
354 ;; Don't phone home to check for updates.
355 (substitute* "system/addon-manifest.xml"
2c17bd7b
EF
356 (("<addon optional=\\\"true\\\">service.xbmc.versioncheck</addon>")
357 ""))
358
f69e2034
MB
359 ;; Let's disable some tests that are known not to work here.
360 ;; Doing this later while in the cmake "../build" directory
361 ;; is trickier.
34f5618b
DT
362 (substitute* '("xbmc/utils/test/TestSystemInfo.cpp")
363 (("TEST_F\\(TestSystemInfo, GetOsPrettyNameWithVersion\\)")
364 "TEST_F(TestSystemInfo, DISABLED_GetOsPrettyNameWithVersion)")
365 (("TEST_F\\(TestSystemInfo, GetOsName\\)")
366 "TEST_F(TestSystemInfo, DISABLED_GetOsName)")
367 (("TEST_F\\(TestSystemInfo, GetOsVersion\\)")
f69e2034 368 "TEST_F(TestSystemInfo, DISABLED_GetOsVersion)"))
f69e2034
MB
369 #t))
370 (add-before 'build 'set-build-environment
371 (lambda _
372 ;; Some bundled build scripts fall back to /bin/sh
373 ;; if this is not set.
374 (setenv "CONFIG_SHELL" (which "sh"))
375 #t))
376 (add-before 'check 'build-kodi-test
377 (lambda _
93ab9a5d 378 (invoke "make" "kodi-test"))))))
34f5618b 379 ;; TODO: Add dependencies for:
f69e2034
MB
380 ;; - cec
381 ;; - plist
382 ;; - shairplay
34f5618b
DT
383 (native-inputs
384 `(("autoconf" ,autoconf)
385 ("automake" ,automake)
b94a6ca0 386 ("gettext" ,gettext-minimal)
d2540f80 387 ("icedtea" ,icedtea) ; needed at build-time only, mandatory
f69e2034
MB
388 ("libdvdcss-bootstrapped" ,libdvdcss/kodi)
389 ("libdvdnav-bootstrapped" ,libdvdnav/kodi)
390 ("libdvdread-bootstrapped" ,libdvdread/kodi)
34f5618b
DT
391 ("libtool" ,libtool)
392 ("pkg-config" ,pkg-config)
393 ("swig" ,swig)
34f5618b
DT
394 ("yasm" ,yasm)))
395 (inputs
396 `(("alsa-lib" ,alsa-lib)
397 ("avahi" ,avahi)
398 ("bluez" ,bluez)
9ced12de 399 ("crossguid" ,crossguid)
34f5618b 400 ("curl" ,curl)
9ced12de 401 ("dcadec" ,dcadec)
34f5618b 402 ("dbus" ,dbus)
34f5618b
DT
403 ("eudev" ,eudev)
404 ("ffmpeg" ,ffmpeg)
405 ("flac" ,flac)
e3407254 406 ("flatbuffers" ,flatbuffers)
f69e2034 407 ("fmt" ,fmt)
34f5618b
DT
408 ("fontconfig" ,fontconfig)
409 ("freetype" ,freetype)
410 ("fribidi" ,fribidi)
e3407254 411 ("fstrcmp" ,fstrcmp)
f69e2034 412 ("giflib" ,giflib)
34f5618b
DT
413 ("glew" ,glew)
414 ("gnutls" ,gnutls)
34f5618b 415 ("lame" ,lame)
f69e2034 416 ("lcms" ,lcms)
34f5618b
DT
417 ("libass" ,libass)
418 ("libbluray" ,libbluray)
419 ("libcap" ,libcap)
420 ("libcdio" ,libcdio)
f69e2034 421 ("libdrm" ,libdrm)
34f5618b 422 ("libgcrypt" ,libgcrypt)
4bd428a7 423 ("libjpeg" ,libjpeg-turbo)
34f5618b
DT
424 ("libltdl" ,libltdl)
425 ("libmad" ,libmad)
426 ("libmicrohttpd" ,libmicrohttpd)
34f5618b 427 ("libmpeg2" ,libmpeg2)
1893c80f 428 ("libnfs" ,libnfs)
34f5618b
DT
429 ("libogg" ,libogg)
430 ("libpng" ,libpng)
34f5618b
DT
431 ("libssh" ,libssh)
432 ("libtiff" ,libtiff)
433 ("libva" ,libva)
434 ("libvorbis" ,libvorbis)
435 ("libxml2" ,libxml2)
34f5618b
DT
436 ("libxrandr" ,libxrandr)
437 ("libxrender" ,libxrender)
438 ("libxslt" ,libxslt)
34f5618b 439 ("lzo" ,lzo)
997abda9 440 ("mariadb-dev" ,mariadb "lib")
2b8491fb 441 ("mariadb-dev" ,mariadb "dev")
34f5618b
DT
442 ("openssl" ,openssl)
443 ("pcre" ,pcre)
444 ("pulseaudio" ,pulseaudio)
445 ("python" ,python-2)
2513aac1 446 ("rapidjson" ,rapidjson)
34f5618b 447 ("samba" ,samba)
34f5618b
DT
448 ("sqlite" ,sqlite)
449 ("taglib" ,taglib)
450 ("tinyxml" ,tinyxml)
8c011737 451 ("tzdata" ,tzdata)
9ced12de 452 ("util-linux" ,util-linux)
34f5618b
DT
453 ("zip" ,zip)
454 ("zlib" ,zlib)))
455 (synopsis "Media center for home theater computers")
456 (description "Kodi is a media center application for playing videos,
457music, games, etc. Kodi is highly customizable and features a theme and
458plug-in system.")
9d2749f6 459 (home-page "https://kodi.tv")
f69e2034
MB
460 ;; XBMC is largely GPL2+, with some library components as LGPL2.1+, but
461 ;; there are some other licenses spread throughout.
462 (license (list license:gpl2+ license:lgpl2.1+
463 license:gpl3+ ;WiiRemote client
464 license:expat ;cpluff, dbwrappers
465 license:public-domain ;cpluff/examples
466 license:bsd-3 ;misc, gtest
e3407254 467 license:bsd-2)))) ;xbmc/freebsd
72df48db 468
b165fe61
MB
469(define-public kodi/wayland
470 (package/inherit kodi
471 (name "kodi-wayland")
472 (arguments
473 (substitute-keyword-arguments (package-arguments kodi)
474 ((#:configure-flags flags)
475 `(append '("-DCORE_PLATFORM_NAME=wayland"
476 "-DWAYLAND_RENDER_SYSTEM=gl")
477 ,flags))))
478 (inputs
479 `(("libinput" ,libinput)
480 ("libxkbcommon" ,libxkbcommon)
481 ("waylandpp" ,waylandpp)
482 ("waylandp-protocols" ,wayland-protocols)
483 ,@(package-inputs kodi)))
484 (synopsis "Kodi with Wayland rendering backend")))
485
72df48db
OP
486(define-public kodi-cli
487 (let ((commit "104dc23b2a993c8e6db8c46f4f8bec24b146549b") ; Add support for
488 (revision "1")) ; `$HOME/.kodirc'.
489 (package
490 (name "kodi-cli")
491 (version (string-append "1.1-" revision "." (string-take commit 7)))
492 (source (origin
493 (method git-fetch)
494 (uri (git-reference (url "https://github.com/nawar/kodi-cli")
495 (commit commit)))
496 (sha256
497 (base32
498 "1xjhasc5gngfxpr1dlzy6q24w0wpdfjx12p43fanjppxw4i49n5p"))
499 (file-name (string-append name "-" version "-checkout"))))
500 (build-system trivial-build-system)
501 (inputs
502 `(("bash" ,bash)
503 ("curl" ,curl)
504 ("mps-youtube" ,mps-youtube)))
505 (arguments
506 `(#:modules ((guix build utils))
507 #:builder
508 (begin
509 (use-modules (guix build utils))
510 (copy-recursively (assoc-ref %build-inputs "source") ".")
511 (substitute* "kodi-cli"
512 (("/bin/bash") (string-append (assoc-ref %build-inputs "bash")
513 "/bin/bash"))
514 (("output=\\$\\((curl)" all curl)
515 (string-append "output=$("
516 (assoc-ref %build-inputs "curl")
517 "/bin/" curl))
518 (("play_youtube `(mpsyt)" all mpsyt)
519 (string-append "play_youtube `"
520 (assoc-ref %build-inputs "mps-youtube")
521 "/bin/" mpsyt)))
522 (install-file "kodi-cli" (string-append %output "/bin"))
523 #t)))
524 (home-page "https://github.com/nawar/kodi-cli")
525 (synopsis "Control Kodi from the command line")
526 (description "@code{kodi-cli} is a tool for sending commands to a Kodi
527server using JSON RPC.
528
529Features:
530
531@itemize
532@item Play, pause, stop the currently playing item.
533@item Skip forward or backward in the currently playing item.
534@item Play or queue to the currently list of YouTube videos.
535@item Interactive and noninteractive volume control.
536@item Interactive navigation.
537@item Send text to the Kodi keyboard.
538@item Toggle fullscreen.
539@item Update or clean Kodi libraries.
540@end itemize\n")
541 (license license:gpl2+))))