GNU bug report logs - #29950
[PATCH] gnu: Add instantmusic.

Previous Next

Package: guix-patches;

Reported by: Stefan Reichör <stefan <at> xsteve.at>

Date: Tue, 2 Jan 2018 18:41:02 UTC

Severity: normal

Tags: patch

Done: ludo <at> gnu.org (Ludovic Courtès)

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 29950 in the body.
You can then email your comments to 29950 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#29950; Package guix-patches. (Tue, 02 Jan 2018 18:41:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stefan Reichör <stefan <at> xsteve.at>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Tue, 02 Jan 2018 18:41:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Stefan Reichör <stefan <at> xsteve.at>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: Add instantmusic.
Date: Tue, 02 Jan 2018 19:39:56 +0100
* gnu/packages/music.scm (instantmusic): New variable.
---
 gnu/packages/music.scm |   41 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 5b8728e..db1c33d 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -14,6 +14,7 @@
 ;;; Copyright © 2017 Pierre Langlois <pierre.langlois <at> gmx.com>
 ;;; Copyright © 2017 Arun Isaac <arunisaac <at> systemreboot.net>
 ;;; Copyright © 2017 Tobias Geerinckx-Rice <me <at> tobias.gr>
+;;; Copyright © 2018 Stefan Reichör <stefan <at> xsteve.at>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -2459,6 +2460,46 @@ websites such as Libre.fm.")
 (define-public python2-pylast
   (package-with-python2 python-pylast))
 
+(define-public instantmusic
+  (let ((commit "300891d09c703525215fa5a116b9294af1c923c8")
+        (revision "1"))
+    (package
+      (name "instantmusic")
+      (version (string-append "0.1-" revision "." (string-take commit 9)))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/yask123/Instant-Music-Downloader.git")
+                      (commit commit)))
+                (file-name (string-append name "-" version "-checkout"))
+                (sha256
+                 (base32
+                  "0j7qivaa04bpdz3anmgci5833dgiyfqqwq9fdrpl9m68b34gl773"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-requests" ,python-requests)
+       ("eyed3", eyed3)
+       ("python-beautifulsoup4" ,python-beautifulsoup4)
+       ("youtube-dl" ,youtube-dl)))
+    (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")
+                      ;; 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)))))
+    (home-page "http://iyask.me/Instant-Music-Downloader/")
+    (synopsis "Command line app to download a song from youtube")
+    (description "Download a song from youtube in .mp3 format.  Songs can be
+searched by artist, name or even by a part of the song text.")
+    (license license:expat))))
+
 (define-public beets
   (package
     (name "beets")





Information forwarded to guix-patches <at> gnu.org:
bug#29950; Package guix-patches. (Thu, 04 Jan 2018 16:34:01 GMT) Full text and rfc822 format available.

Message #8 received at 29950 <at> debbugs.gnu.org (full text, mbox):

From: Leo Famulari <leo <at> famulari.name>
To: Stefan Reichör <stefan <at> xsteve.at>
Cc: 29950 <at> debbugs.gnu.org
Subject: Re: [bug#29950] [PATCH] gnu: Add instantmusic.
Date: Thu, 4 Jan 2018 11:33:42 -0500
[Message part 1 (text/plain, inline)]
On Tue, Jan 02, 2018 at 07:39:56PM +0100, Stefan Reichör wrote:
> * gnu/packages/music.scm (instantmusic): New variable.

Thanks for this patch Stefan! I have some comments...

> +      (version (string-append "0.1-" revision "." (string-take commit 9)))

I noticed the latest upstream release is tagged "v1.0" rather than
"0.1". Also, it's convenient and more maintainable to create the version
of Git-based packages like this:

(version (git-version "1.0" revision commit))

> +                (file-name (string-append name "-" version "-checkout"))

And similarly for the file-name:

(file-name (git-file-name name version))

Those two procedures come from (guix git-download).

> +    (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")
> +                      ;; 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)))))

I guess that changing the build directory and chmod-ing those files are
required for their own reasons, right? So they should be in separate
build phases.

Can you send an updated patch?
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#29950; Package guix-patches. (Sun, 21 Jan 2018 16:24:02 GMT) Full text and rfc822 format available.

Message #11 received at 29950 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Reichör <stefan <at> xsteve.at>
To: Leo Famulari <leo <at> famulari.name>
Cc: 29950 <at> debbugs.gnu.org
Subject: Re: [bug#29950] [PATCH] gnu: Add instantmusic.
Date: Sun, 21 Jan 2018 17:23:35 +0100
Leo Famulari <leo <at> famulari.name> writes:

Thanks for your review. I was rather busy these days. So it took some
time until I was able to respond...

> On Tue, Jan 02, 2018 at 07:39:56PM +0100, Stefan Reichör wrote:
>> * gnu/packages/music.scm (instantmusic): New variable.
>
> Thanks for this patch Stefan! I have some comments...
>
>> +      (version (string-append "0.1-" revision "." (string-take commit 9)))
>
> I noticed the latest upstream release is tagged "v1.0" rather than
> "0.1". Also, it's convenient and more maintainable to create the version
> of Git-based packages like this:
>
> (version (git-version "1.0" revision commit))
>
>> +                (file-name (string-append name "-" version "-checkout"))
>
> And similarly for the file-name:
>
> (file-name (git-file-name name version))
>
> Those two procedures come from (guix git-download).

Thanks for these git related short cuts. They are rather new and not yet
widely used. But I agree that they make the description shorter and
better readable.

>> +    (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")
>> +                      ;; 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)))))
>
> I guess that changing the build directory and chmod-ing those files are
> required for their own reasons, right? So they should be in separate
> build phases.

The chdir is needed to ensure that the build is started in the correct
directory. I found out that the chmod block is required in the check
phase. So I changed it that way.



> Can you send an updated patch?

* gnu/packages/music.scm (instantmusic): New variable.
---
 gnu/packages/music.scm |   43 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)

diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index b7dc7d9..7beba4b 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -15,6 +15,7 @@
 ;;; Copyright © 2017 Arun Isaac <arunisaac <at> systemreboot.net>
 ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me <at> tobias.gr>
 ;;; Copyright © 2018 nee <nee.git <at> hidamari.blue>
+;;; Copyright © 2018 Stefan Reichör <stefan <at> xsteve.at>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -2487,6 +2488,48 @@ websites such as Libre.fm.")
 (define-public python2-pylast
   (package-with-python2 python-pylast))
 
+(define-public instantmusic
+  (let ((commit "300891d09c703525215fa5a116b9294af1c923c8")
+        (revision "1"))
+    (package
+      (name "instantmusic")
+      (version (git-version "1.0" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/yask123/Instant-Music-Downloader.git")
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "0j7qivaa04bpdz3anmgci5833dgiyfqqwq9fdrpl9m68b34gl773"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-requests" ,python-requests)
+       ("eyed3", eyed3)
+       ("python-beautifulsoup4" ,python-beautifulsoup4)
+       ("youtube-dl" ,youtube-dl)))
+    (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 'check '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)))))
+    (home-page "http://iyask.me/Instant-Music-Downloader/")
+    (synopsis "Command line app to download a song from youtube")
+    (description "Download a song from youtube in .mp3 format.  Songs can be
+searched by artist, name or even by a part of the song text.")
+    (license license:expat))))
+
 (define-public beets
   (package
     (name "beets")





Reply sent to ludo <at> gnu.org (Ludovic Courtès):
You have taken responsibility. (Sun, 28 Jan 2018 22:47:01 GMT) Full text and rfc822 format available.

Notification sent to Stefan Reichör <stefan <at> xsteve.at>:
bug acknowledged by developer. (Sun, 28 Jan 2018 22:47:02 GMT) Full text and rfc822 format available.

Message #16 received at 29950-done <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Stefan Reichör <stefan <at> xsteve.at>
Cc: 29950-done <at> debbugs.gnu.org, Leo Famulari <leo <at> famulari.name>
Subject: Re: [bug#29950] [PATCH] gnu: Add instantmusic.
Date: Sun, 28 Jan 2018 23:46:05 +0100
[Message part 1 (text/plain, inline)]
Hi Stefan,

Stefan Reichör <stefan <at> xsteve.at> skribis:

>> Can you send an updated patch?
>
> * gnu/packages/music.scm (instantmusic): New variable.

I applied the cosmetic changes below and committed.

In the future please send the file produced by ‘git format-patch’ so
that the reviewer can directly pipe it through ‘git am’.

Thank you!

Ludo’.

[Message part 2 (text/x-patch, inline)]
diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 57ef87bf9..9e06bf55a 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -2527,9 +2527,9 @@ websites such as Libre.fm.")
                                             "PKG-INFO|.*\\.txt"))
                       #t)))))
     (home-page "http://iyask.me/Instant-Music-Downloader/")
-    (synopsis "Command line app to download a song from youtube")
-    (description "Download a song from youtube in .mp3 format.  Songs can be
-searched by artist, name or even by a part of the song text.")
+    (synopsis "Command-line program to download a song from YouTube")
+    (description "InstantMusic downloads a song from YouTube in MP3 format.
+Songs can be searched by artist, name or even by a part of the song text.")
     (license license:expat))))
 
 (define-public beets

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 26 Feb 2018 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 60 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.