guix_mirror_bot pushed a commit to branch master
in repository guix.

commit e4e64a4887fb44961c7c5f1e87edfd0030c075b8
Author: Hugo Buddelmeijer <[email protected]>
AuthorDate: Tue Oct 21 01:20:29 2025 +0200

    gnu: kodi-cli: Fix build by adapting to yewtube.
    
    * gnu/packages/kodi.scm (kodi-cli): Fix build and modernize package a bit.
    [inputs]: Remove bash and mps-youtube; add bash-minimal and python-yewtube.
    [arguments]: Switch to gexp.
    <#:builder>: Update package to work with yewtube.
    
    Change-Id: Ie8fe3ca67a722d4cacf708b86be6b9d90d12e44e
    Reviewed-by: Nicolas Graves <[email protected]>
    Signed-off-by: Sharlatan Hellseher <[email protected]>
---
 gnu/packages/kodi.scm | 44 +++++++++++++++++++++++---------------------
 1 file changed, 23 insertions(+), 21 deletions(-)

diff --git a/gnu/packages/kodi.scm b/gnu/packages/kodi.scm
index 73417fabe2..dec1a6f998 100644
--- a/gnu/packages/kodi.scm
+++ b/gnu/packages/kodi.scm
@@ -30,6 +30,7 @@
   #:use-module (guix utils)
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (guix gexp)
   #:use-module (guix git-download)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
@@ -525,7 +526,7 @@ plug-in system.")
         (revision "1"))                                     ; `$HOME/.kodirc'.
     (package
       (name "kodi-cli")
-      (version (string-append "1.1-" revision "." (string-take commit 7)))
+      (version (git-version "1.1" revision commit))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference (url "https://github.com/nawar/kodi-cli";)
@@ -533,29 +534,30 @@ plug-in system.")
                 (sha256
                  (base32
                   "1xjhasc5gngfxpr1dlzy6q24w0wpdfjx12p43fanjppxw4i49n5p"))
-                (file-name (string-append name "-" version "-checkout"))))
+                (file-name (git-file-name name version))))
       (build-system trivial-build-system)
       (inputs
-       (list bash curl mps-youtube))
+       (list bash-minimal curl python-yewtube))
       (arguments
-       `(#:modules ((guix build utils))
-         #:builder
-         (begin
-           (use-modules (guix build utils))
-           (copy-recursively (assoc-ref %build-inputs "source") ".")
-           (substitute* "kodi-cli"
-             (("/bin/bash")
-              (search-input-file %build-inputs "/bin/bash"))
-             (("output=\\$\\((curl)" all curl)
-              (string-append "output=$("
-                             (assoc-ref %build-inputs "curl")
-                             "/bin/" curl))
-             (("play_youtube `(mpsyt)" all mpsyt)
-              (string-append "play_youtube `"
-                             (assoc-ref %build-inputs "mps-youtube")
-                             "/bin/" mpsyt)))
-           (install-file "kodi-cli" (string-append %output "/bin"))
-           #t)))
+       (list
+        #:modules '((guix build utils))
+        #:builder
+        #~(begin
+          (use-modules (guix build utils))
+          (copy-recursively (assoc-ref %build-inputs "source") ".")
+          (substitute* "kodi-cli"
+            (("/bin/bash")
+             (search-input-file %build-inputs "/bin/bash"))
+            (("output=\\$\\((curl)" all curl)
+             (string-append "output=$("
+                            #$(this-package-input "curl")
+                            "/bin/" curl))
+            ;; Executable is just called yt with yewtube.
+            (("play_youtube `mpsyt")
+             (string-append "play_youtube `"
+                            #$(this-package-input "python-yewtube")
+                            "/bin/yt")))
+          (install-file "kodi-cli" (string-append %output "/bin")))))
       (home-page "https://github.com/nawar/kodi-cli";)
       (synopsis "Control Kodi from the command line")
       (description "@code{kodi-cli} is a tool for sending commands to a Kodi

Reply via email to