guix_mirror_bot pushed a commit to branch master
in repository guix.

commit 2d40b254bee86c0f7c3388f34cf4680539e9613a
Author: Nicolas Graves <[email protected]>
AuthorDate: Tue Aug 12 14:19:18 2025 +0200

    gnu: instantmusic: Switch to pyproject.
    
    * gnu/packages/music.scm (instantmusic):
    [build-system]: Switch to pyproject-build-system.
    [arguments]<#:modules>: Remove them.
    <#:phases>: Migrate to gexps. Add phase 'patch-yt-dlp. Refresh
    'fix-file-permissions to avoid use of <#:modules>.
    [native-inputs]: Add python-setuptools, python-wheel.
    [inputs]: Add yt-dlp.
    [propagated-inputs]: Remove youtube-dl.
    
    Change-Id: Ia60bfd23c70bafacdb4efd1686611d317f60e0e0
    Signed-off-by: Sharlatan Hellseher <[email protected]>
---
 gnu/packages/music.scm | 42 +++++++++++++++++++++++++-----------------
 1 file changed, 25 insertions(+), 17 deletions(-)

diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 860d63b366..7b4d0af1f7 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -4279,24 +4279,32 @@ websites such as Libre.fm.")
                 (sha256
                  (base32
                   "0j7qivaa04bpdz3anmgci5833dgiyfqqwq9fdrpl9m68b34gl773"))))
-    (build-system python-build-system)
-    (propagated-inputs
-     (list python-requests eyed3 python-beautifulsoup4 youtube-dl))
+    (build-system pyproject-build-system)
     (arguments
-     '(#:modules ((guix build python-build-system)
-                  (guix build utils)
-                  (srfi srfi-26))
-       #:phases (modify-phases %standard-phases
-                  (add-before 'build 'change-directory
-                    (lambda _
-                      (chdir "instantmusic-0.1") #t))
-                  (add-before 'install 'fix-file-permissions
-                    (lambda _
-                      ;; Fix some read-only files that would cause a build 
failure
-                      (for-each (cut chmod <> #o644)
-                                (find-files "instantmusic.egg-info"
-                                            "PKG-INFO|.*\\.txt"))
-                      #t)))))
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-before 'build 'change-directory
+            (lambda _
+              (chdir "instantmusic-0.1")))
+          (add-before 'build 'patch-yt-dlp
+            (lambda* (#:key inputs #:allow-other-keys)
+              (substitute* "bin/instantmusic"
+                (("youtube-dl")
+                 (search-input-file inputs "bin/yt-dlp")))
+              (substitute* "setup.py"
+                (("youtube-dl")
+                 "yt-dlp"))))
+          (add-before 'install 'fix-file-permissions
+            (lambda _
+              ;; Fix some read-only files that would cause a build failure
+              (for-each (lambda (file)
+                          (chmod file #o644))
+                        (find-files "instantmusic.egg-info"
+                                    "PKG-INFO|.*\\.txt")))))))
+    (native-inputs (list python-setuptools python-wheel))
+    (inputs (list yt-dlp))
+    (propagated-inputs (list python-requests eyed3 python-beautifulsoup4))
     (home-page "https://github.com/yask123/Instant-Music-Downloader";)
     (synopsis "Command-line program to download a song from YouTube")
     (description "InstantMusic downloads a song from YouTube in MP3 format.

Reply via email to