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