[PATCH 0/2] Update Nicotine to 2.1.2

  • Done
  • quality assurance status badge
Details
2 participants
  • Leo Famulari
  • Martin Becze
Owner
unassigned
Submitted by
Martin Becze
Severity
normal
M
M
Martin Becze wrote on 30 Nov 2020 11:47
(address . guix-patches@gnu.org)(name . Martin Becze)(address . mjbecze@riseup.net)
20201130104752.8601-1-mjbecze@riseup.net
This updates Nicotine to 2.1.2 and adds the its dependencies.

Martin Becze (2):
gnu: Add python-pytaglib.
gnu: nicotine: Update to 2.1.2.

gnu/packages/mp3.scm | 25 +++++++++++++++++++++++++
gnu/packages/nicotine.scm | 16 ++++++++--------
2 files changed, 33 insertions(+), 8 deletions(-)

--
2.29.2
M
M
Martin Becze wrote on 30 Nov 2020 11:50
[PATCH 1/2] gnu: Add python-pytaglib.
(address . 44958@debbugs.gnu.org)(name . Martin Becze)(address . mjbecze@riseup.net)
20201130105047.8755-1-mjbecze@riseup.net
* gnu/packages/mp3.scm (python-pytaglib): New variable.
---
gnu/packages/mp3.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

Toggle diff (35 lines)
diff --git a/gnu/packages/mp3.scm b/gnu/packages/mp3.scm
index ac546e8c95..2a7242dc42 100644
--- a/gnu/packages/mp3.scm
+++ b/gnu/packages/mp3.scm
@@ -591,3 +591,28 @@ FFmpeg, etc.")
"This package provides bindings for the Chromaprint acoustic
fingerprinting library and the Acoustid API.")
(license license:expat)))
+
+(define-public python-pytaglib
+ (package
+ (name "python-pytaglib")
+ (version "1.4.6")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "pytaglib" version))
+ (sha256
+ (base32
+ "0li970qslfymz4vk1wrij2nfqw3l15cpc3fjjci48mpvg17gbnhn"))))
+ (build-system python-build-system)
+ (native-inputs
+ `(("taglib" ,taglib)
+ ("python-pytest" ,python-pytest)))
+ (home-page
+ "http://github.com/supermihi/pytaglib")
+ (synopsis
+ "Python binding for taglib")
+ (description
+ "This package is a Python audio tagging library. It is
+cross-platform, works with all Python versions, and is very
+simple to use yet fully feature.")
+ (license license:gpl3+)))
--
2.29.2
M
M
Martin Becze wrote on 30 Nov 2020 11:50
[PATCH 2/2] gnu: nicotine: Update to 2.1.2.
(address . 44958@debbugs.gnu.org)(name . Martin Becze)(address . mjbecze@riseup.net)
20201130105047.8755-2-mjbecze@riseup.net
* gnu/packages/nicotine.scm (nicotine+): Update to 2.1.2.
---
gnu/packages/nicotine.scm | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)

Toggle diff (50 lines)
diff --git a/gnu/packages/nicotine.scm b/gnu/packages/nicotine.scm
index dee2917c49..5dc39334eb 100644
--- a/gnu/packages/nicotine.scm
+++ b/gnu/packages/nicotine.scm
@@ -21,23 +21,23 @@
#:use-module (guix packages)
#:use-module (guix git-download)
#:use-module (guix build-system python)
- #:use-module (gnu packages python-xyz)
#:use-module (gnu packages glib)
+ #:use-module (gnu packages gettext)
#:use-module (gnu packages gtk)
#:use-module (gnu packages check)
- #:use-module (gnu packages music))
+ #:use-module (gnu packages mp3))
(define-public nicotine+
(package
(name "nicotine+")
- (version "2.0.1")
+ (version "2.1.2")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/Nicotine-Plus/nicotine-plus")
(commit version)))
(file-name (git-file-name name version))
- (sha256 (base32 "07xagm6kwy8b6gcdv5vx78yqfllkz1gvlakkf0hi2c9ivncq457g"))))
+ (sha256 (base32 "18rra8yqjr10z23chzcp53ncbd5fhm0iqgqxpbxfq7a10za02v6l"))))
(build-system python-build-system)
(arguments
'(#:phases
@@ -53,11 +53,11 @@
#t))))))
(inputs
`(("python-pygobject" ,python-pygobject)
- ("python-mutagen" ,python-mutagen)
- ("python-dbus" ,python-dbus)
- ("gtk+" ,gtk+)))
+ ("python-pytaglib" ,python-pytaglib)))
(native-inputs
- `(("python-pytest" ,python-pytest)))
+ `(("python-pytest" ,python-pytest)
+ ("gettext" ,gnu-gettext)
+ ("gtk+" ,gtk+)))
(home-page "https://nicotine-plus.github.io/nicotine-plus/")
(synopsis "Graphical client for Soulseek")
(description
--
2.29.2
L
L
Leo Famulari wrote on 30 Nov 2020 18:11
Re: [bug#44958] [PATCH 1/2] gnu: Add python-pytaglib.
(name . Martin Becze)(address . mjbecze@riseup.net)(address . 44958@debbugs.gnu.org)
X8Unu0QrrNI2nG0f@jasmine.lan
On Mon, Nov 30, 2020 at 04:50:46AM -0600, Martin Becze wrote:
Toggle quote (2 lines)
> * gnu/packages/mp3.scm (python-pytaglib): New variable.

Thanks!

I applied your patch along with these changes, explained below:

------
Toggle diff (56 lines)
diff --git a/gnu/packages/mp3.scm b/gnu/packages/mp3.scm
index 487117cc7d..e622f703d3 100644
--- a/gnu/packages/mp3.scm
+++ b/gnu/packages/mp3.scm
@@ -602,17 +602,31 @@ fingerprinting library and the Acoustid API.")
(uri (pypi-uri "pytaglib" version))
(sha256
(base32
- "0li970qslfymz4vk1wrij2nfqw3l15cpc3fjjci48mpvg17gbnhn"))))
+ "0li970qslfymz4vk1wrij2nfqw3l15cpc3fjjci48mpvg17gbnhn"))
+ ;; Delete file generated by Cython.
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ (delete-file "src/taglib.cpp")))))
(build-system python-build-system)
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ ;; Ensure that the Cython file is regenerated.
+ (add-after 'unpack 'setup-environment
+ (lambda _
+ (setenv "PYTAGLIB_CYTHONIZE" "1"))))))
(native-inputs
- `(("taglib" ,taglib)
+ `(("python-cython" ,python-cython)
("python-pytest" ,python-pytest)))
+ (inputs
+ `(("taglib" ,taglib)))
(home-page
"https://github.com/supermihi/pytaglib")
(synopsis
- "Python binding for taglib")
+ "Python bindings for taglib")
(description
"This package is a Python audio tagging library. It is
cross-platform, works with all Python versions, and is very
-simple to use yet fully feature.")
+simple to use yet fully featured.")
(license license:gpl3+)))
------

In general, we try not to use "pre-built" C and C++ files that are
created by Cython. They are not really considered "source code" because
they are not in the format preferred for editing.

I moved the taglib dependency from native-inputs to inputs, because it
is still referred to by the built pytaglib:

------
$ guix gc --references $(./pre-inst-env guix build --no-grafts python-pytaglib) | grep taglib-1.12
/gnu/store/b12szz8wy7wxvfv2jfj5ygqkgqar03ih-taglib-1.12-beta-1
------

And I made some minor grammatical changes in the synopsis and
description. Thanks again!
L
L
Leo Famulari wrote on 30 Nov 2020 18:21
Re: [bug#44958] [PATCH 2/2] gnu: nicotine: Update to 2.1.2.
(name . Martin Becze)(address . mjbecze@riseup.net)(address . 44958@debbugs.gnu.org)
X8UqHjADTki62D8J@jasmine.lan
On Mon, Nov 30, 2020 at 04:50:47AM -0600, Martin Becze wrote:
Toggle quote (2 lines)
> * gnu/packages/nicotine.scm (nicotine+): Update to 2.1.2.

Awesome, thanks for keeping up with this package!

I noticed that on my Debian system, Nicotine would crash when I tried to
open the "settings" window, with this message:

------
(.nicotine-real:20767): GLib-GIO-ERROR **: 12:12:44.338: Settings schema 'org.gtk.Settings.FileChooser' is not installed
------

I guessed it needed some of the special wrappers from the GLib / GTK+
build systems, so I used them by applying this diff to your patch:

------
Toggle diff (52 lines)
diff --git a/gnu/packages/nicotine.scm b/gnu/packages/nicotine.scm
index 5dc39334eb..7d937c11e5 100644
--- a/gnu/packages/nicotine.scm
+++ b/gnu/packages/nicotine.scm
@@ -40,7 +40,13 @@
(sha256 (base32 "18rra8yqjr10z23chzcp53ncbd5fhm0iqgqxpbxfq7a10za02v6l"))))
(build-system python-build-system)
(arguments
- '(#:phases
+ `(#:imported-modules ((guix build glib-or-gtk-build-system)
+ ,@%python-build-system-modules)
+ #:modules
+ ((guix build utils)
+ (guix build python-build-system)
+ ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:))
+ #:phases
(modify-phases %standard-phases
(add-after 'install 'wrap-program
(lambda* (#:key outputs #:allow-other-keys)
@@ -50,14 +56,19 @@
(gi-typelib-path (getenv "GI_TYPELIB_PATH")))
(wrap-program prog
`("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path)))
- #t))))))
+ #t)))
+ (add-after 'wrap-program 'glib-or-gtk-wrap
+ (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap))
+ (add-after 'glib-or-gtk-wrap 'glib-or-gtk-compile-schemas
+ (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-compile-schemas))
+ )))
(inputs
- `(("python-pygobject" ,python-pygobject)
+ `(("gtk+" ,gtk+)
+ ("python-pygobject" ,python-pygobject)
("python-pytaglib" ,python-pytaglib)))
(native-inputs
`(("python-pytest" ,python-pytest)
- ("gettext" ,gnu-gettext)
- ("gtk+" ,gtk+)))
+ ("gettext" ,gnu-gettext)))
(home-page "https://nicotine-plus.github.io/nicotine-plus/")
(synopsis "Graphical client for Soulseek")
(description
------

I also moved the GTK+ input from native-inputs to inputs, since it is
referred to by the built Nicotine+ package. Native-inputs are for
packages that are only used while building, but we can expect GTK+ to be
used at run-time for this package.

And I swapped out gnu-gettext for gettext-minimal, to avoid depending on
Emacs.
L
L
Leo Famulari wrote on 30 Nov 2020 18:24
Re: [bug#44958] [PATCH 1/2] gnu: Add python-pytaglib.
(name . Martin Becze)(address . mjbecze@riseup.net)(address . 44958@debbugs.gnu.org)
X8Uq4h1JhRu/3ioF@jasmine.lan
On Mon, Nov 30, 2020 at 04:50:46AM -0600, Martin Becze wrote:
Toggle quote (4 lines)
> * gnu/packages/mp3.scm (python-pytaglib): New variable.

> + (license license:gpl3+)))

Also, I changed this to 'gpl3'. The source file license headers do not
mention any later versions of the license.
L
L
Leo Famulari wrote on 30 Nov 2020 18:25
Re: [bug#44958] [PATCH 0/2] Update Nicotine to 2.1.2
(name . Martin Becze)(address . mjbecze@riseup.net)(address . 44958-done@debbugs.gnu.org)
X8Uq/vEDZxhzC6cl@jasmine.lan
On Mon, Nov 30, 2020 at 04:47:52AM -0600, Martin Becze wrote:
Toggle quote (6 lines)
> This updates Nicotine to 2.1.2 and adds the its dependencies.
>
> Martin Becze (2):
> gnu: Add python-pytaglib.
> gnu: nicotine: Update to 2.1.2.

Thanks! Pushed as d6c4a436d7de43e88ccc67ceaee7c5caea9cd871 with the
changes mentioned in my replies to the patches themselves.
Closed
M
M
Martin Becze wrote on 30 Nov 2020 18:29
Re: [bug#44958] [PATCH 1/2] gnu: Add python-pytaglib.
(name . Leo Famulari)(address . leo@famulari.name)(address . 44958@debbugs.gnu.org)
6f62032b-1d92-c582-c483-e9d28b5b3382@riseup.net
Thank you for reviewing this Leo.

On 11/30/20 11:24 AM, Leo Famulari wrote:
Toggle quote (8 lines)
> On Mon, Nov 30, 2020 at 04:50:46AM -0600, Martin Becze wrote:
>> * gnu/packages/mp3.scm (python-pytaglib): New variable.
>
>> + (license license:gpl3+)))
>
> Also, I changed this to 'gpl3'. The source file license headers do not
> mention any later versions of the license.
>
Ok cool! I didn't realize there was a difference.
L
L
Leo Famulari wrote on 30 Nov 2020 18:35
(name . Martin Becze)(address . mjbecze@riseup.net)(address . 44958@debbugs.gnu.org)
X8UteRHL8FJcGGIf@jasmine.lan
On Mon, Nov 30, 2020 at 11:29:56AM -0600, Martin Becze wrote:
Toggle quote (6 lines)
> On 11/30/20 11:24 AM, Leo Famulari wrote:
> > Also, I changed this to 'gpl3'. The source file license headers do not
> > mention any later versions of the license.
> >
> Ok cool! I didn't realize there was a difference.

Here's an example of what it looks like when the "or later" clause is
present:


Basically, it means the copyright holder agrees in advance to use any
version of the GPL that the Free Software Foundation may invent in the
future.
?