all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#56668] [PATCH] gnu: Add wavbreaker
@ 2022-07-20 12:07 Joeke de Graaf
  2022-07-23 19:50 ` Maxime Devos
                   ` (6 more replies)
  0 siblings, 7 replies; 13+ messages in thread
From: Joeke de Graaf @ 2022-07-20 12:07 UTC (permalink / raw)
  To: 56668

[-- Attachment #1: Type: text/plain, Size: 90 bytes --]

Hello,

This patch adds the wavbreaker package to mp3.scm

Best regards,

Joeke de Graaf


[-- Attachment #2: 0001-gnu-Add-wavbreaker.patch --]
[-- Type: text/x-patch, Size: 2752 bytes --]

From 2f512eb8a85c4920aeea5f673129d1507f32cbb9 Mon Sep 17 00:00:00 2001
From: Joeke de Graaf <joeke@posteo.net>
Date: Wed, 20 Jul 2022 13:58:38 +0200
Subject: [PATCH] gnu: Add wavbreaker

---
 gnu/packages/mp3.scm | 32 +++++++++++++++++++++++++++++++-
 1 file changed, 31 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/mp3.scm b/gnu/packages/mp3.scm
index 4a8bdad711..a3207ef062 100644
--- a/gnu/packages/mp3.scm
+++ b/gnu/packages/mp3.scm
@@ -10,6 +10,7 @@
 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
 ;;; Copyright © 2021 Simon Streit <simon@netpanic.org>
 ;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
+;;; Copyright © 2022 Joeke de Graaf <joeke@posteo.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -50,13 +51,15 @@ (define-module (gnu packages mp3)
   #:use-module (gnu packages pulseaudio)
   #:use-module (gnu packages linux)               ;alsa-lib
   #:use-module (gnu packages video)               ;ffmpeg
+  #:use-module (gnu packages cmake)
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix git-download)
   #:use-module (guix utils)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system python)
-  #:use-module (guix build-system cmake))
+  #:use-module (guix build-system cmake)
+  #:use-module (guix build-system meson))
 
 (define-public libmad
   (package
@@ -710,3 +713,30 @@ (define-public python-pytaglib
 cross-platform, works with all Python versions, and is very
 simple to use yet fully featured.")
     (license license:gpl3)))
+
+(define-public wavbreaker
+  (package
+    (name "wavbreaker")
+    (version "0.15")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/thp/wavbreaker/")
+                    (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32 "16h0sfcb8av6a368giizzwv9m0lq5c3bnf4b9vyyh9nkbbsc7c3j"))))
+    (build-system meson-build-system)
+    (native-inputs
+     (list pkg-config cmake))
+    (inputs (list glib gtk+ ao))
+    (home-page "https://wavbreaker.sourceforge.io/")
+    (synopsis "WAV and MP3 file splitter with a GUI")
+    (description
+     "Wavbreaker is a WAV and MP3 file splitter.  It can be used to
+break up a WAV or MP3 audio file into multiple WAV files.
+Wavbreaker contains a helpful waveform display of the audio file
+being edited, to help the user in splitting the file at the right
+point.  Wavbreaker also supports splitting MP3 files without
+re-encoding them, to preserve their original audio quality.")
+    (license license:gpl2)))
-- 
2.37.0


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [bug#56668] [PATCH] gnu: Add wavbreaker
  2022-07-20 12:07 [bug#56668] [PATCH] gnu: Add wavbreaker Joeke de Graaf
@ 2022-07-23 19:50 ` Maxime Devos
  2022-07-23 19:51 ` Maxime Devos
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 13+ messages in thread
From: Maxime Devos @ 2022-07-23 19:50 UTC (permalink / raw)
  To: Joeke de Graaf, 56668


[-- Attachment #1.1.1: Type: text/plain, Size: 459 bytes --]

On 20-07-2022 14:07, Joeke de Graaf wrote:

> +    (native-inputs
> +     (list pkg-config cmake))
> +    (inputs (list glib gtk+ ao))

Please check that it works nicely (with, e.g., no missing icons, which 
sometimes happens for GTK+ stuff) in a pure environment. Try:

$ guix shell --pure wavbreaker -- 
insert-the-binary-name-here,probably-wavbreaker

If there are problems, we'll have to add some things to fix them.

Greetings,
Maxime.


[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 929 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [bug#56668] [PATCH] gnu: Add wavbreaker
  2022-07-20 12:07 [bug#56668] [PATCH] gnu: Add wavbreaker Joeke de Graaf
  2022-07-23 19:50 ` Maxime Devos
@ 2022-07-23 19:51 ` Maxime Devos
  2022-07-23 22:14 ` Joeke de Graaf
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 13+ messages in thread
From: Maxime Devos @ 2022-07-23 19:51 UTC (permalink / raw)
  To: Joeke de Graaf, 56668


[-- Attachment #1.1.1: Type: text/plain, Size: 265 bytes --]


On 20-07-2022 14:07, Joeke de Graaf wrote:
> +    (license license:gpl2)))

Going by https://github.com/thp/wavbreaker/blob/master/src/appconfig.c, 
it's actually gpl2+, though I haven't verified whether that applies to 
all files.

Greetings,
Maxime.


[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 929 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [bug#56668] [PATCH] gnu: Add wavbreaker
  2022-07-20 12:07 [bug#56668] [PATCH] gnu: Add wavbreaker Joeke de Graaf
  2022-07-23 19:50 ` Maxime Devos
  2022-07-23 19:51 ` Maxime Devos
@ 2022-07-23 22:14 ` Joeke de Graaf
  2022-07-23 22:27   ` Maxime Devos
  2022-07-24 10:31   ` ( via Guix-patches via
  2022-07-24 18:07 ` Joeke de Graaf
                   ` (3 subsequent siblings)
  6 siblings, 2 replies; 13+ messages in thread
From: Joeke de Graaf @ 2022-07-23 22:14 UTC (permalink / raw)
  To: 56668

[-- Attachment #1: Type: text/plain, Size: 1315 bytes --]

On 23.07.2022 21:51, Maxime Devos wrote:
> On 20-07-2022 14:07, Joeke de Graaf wrote:
>> +    (license license:gpl2)))
> 
> Going by
> https://github.com/thp/wavbreaker/blob/master/src/appconfig.c, it's
> actually gpl2+, though I haven't verified whether that applies to all
> files.

You're right, I missed that. I attached a new patch.

On 23.07.2022 21:50, Maxime Devos wrote:
> On 20-07-2022 14:07, Joeke de Graaf wrote:
> 
>> +    (native-inputs
>> +     (list pkg-config cmake))
>> +    (inputs (list glib gtk+ ao))
> 
> Please check that it works nicely (with, e.g., no missing icons, which
> sometimes happens for GTK+ stuff) in a pure environment. Try:
> 
> $ guix shell --pure wavbreaker --
> insert-the-binary-name-here,probably-wavbreaker
> 
> If there are problems, we'll have to add some things to fix them.

It seems that in the package's current state, it does not like being run 
in a pure environment, it simply crashes.
The application seems to expect GTK icons to be in a certain place and 
it's not finding them.
It's not immediately obvious to me what the solution for this is, but I 
gather from your previous e-mail that this is a known and fixable 
problem.

In any case, I attached the output of
$ guix shell --pure -- wavbreaker
as a plain text attachment.


Best regards,

Joeke de Graaf

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-wavbreaker.patch --]
[-- Type: text/x-patch; name=0001-gnu-Add-wavbreaker.patch, Size: 2681 bytes --]

From d2a7b50cb8148355b725c90ac9068f103b94970e Mon Sep 17 00:00:00 2001
From: Joeke de Graaf <joeke@posteo.net>
Date: Sat, 23 Jul 2022 23:25:12 +0200
Subject: [PATCH] gnu: Add wavbreaker

---
 gnu/packages/mp3.scm | 32 +++++++++++++++++++++++++++++++-
 1 file changed, 31 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/mp3.scm b/gnu/packages/mp3.scm
index 4a8bdad711..a42dc26ddf 100644
--- a/gnu/packages/mp3.scm
+++ b/gnu/packages/mp3.scm
@@ -10,6 +10,7 @@
 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
 ;;; Copyright © 2021 Simon Streit <simon@netpanic.org>
 ;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
+;;; Copyright © 2022 Joeke de Graaf <joeke@posteo.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -50,13 +51,15 @@ (define-module (gnu packages mp3)
   #:use-module (gnu packages pulseaudio)
   #:use-module (gnu packages linux)               ;alsa-lib
   #:use-module (gnu packages video)               ;ffmpeg
+  #:use-module (gnu packages cmake)
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix git-download)
   #:use-module (guix utils)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system python)
-  #:use-module (guix build-system cmake))
+  #:use-module (guix build-system cmake)
+  #:use-module (guix build-system-meson))
 
 (define-public libmad
   (package
@@ -710,3 +713,30 @@ (define-public python-pytaglib
 cross-platform, works with all Python versions, and is very
 simple to use yet fully featured.")
     (license license:gpl3)))
+
+(define-public wavbreaker
+  (package
+    (name "wavbreaker")
+    (version "0.15")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/thp/wavbreaker/")
+                    (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32 "16h0sfcb8av6a368giizzwv9m0lq5c3bnf4b9vyyh9nkbbsc7c3j"))))
+    (build-system meson-build-system)
+    (native-inputs
+     (list pkg-config cmake))
+    (inputs (list glib gtk+ ao))
+    (home-page "https://wavbreaker.sourceforge.io/")
+    (synopsis "WAV and MP3 file splitter with a GUI")
+    (description
+     "Wavbreaker is a WAV and MP3 file splitter.  It can be used to
+break up a WAV or MP3 audio file into multiple WAV files.
+Wavbreaker contains a helpful waveform display of the audio file
+being edited, to help the user in splitting the file at the right
+point.  Wavbreaker also supports splitting MP3 files without
+re-encoding them, to preserve their original audio quality.")
+    (license license:gpl2+)))
-- 
2.37.0


[-- Attachment #3: wavbreaker-pure-environment-output.txt --]
[-- Type: text/plain, Size: 962 bytes --]

$ guix shell --pure wavbreaker -- wavbreaker

(wavbreaker:30189): Gtk-WARNING **: 23:42:50.230: Could not find the icon 'document-open-symbolic-ltr'. The 'hicolor' theme
was not found either, perhaps you need to install it.
You can get a copy from:
        http://icon-theme.freedesktop.org/releases

(wavbreaker:30189): Gtk-WARNING **: 23:42:50.230: Could not load a pixbuf from /org/gtk/libgtk/icons/16x16/status/image-missing.png.
This may indicate that pixbuf loaders or the mime database could not be found.
**
Gtk:ERROR:gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /org/gtk/libgtk/icons/16x16/status/image-missing.png: Unrecognized image file format (gdk-pixbuf-error-quark, 3)
Bail out! Gtk:ERROR:gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /org/gtk/libgtk/icons/16x16/status/image-missing.png: Unrecognized image file format (gdk-pixbuf-error-quark, 3)

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [bug#56668] [PATCH] gnu: Add wavbreaker
  2022-07-23 22:14 ` Joeke de Graaf
@ 2022-07-23 22:27   ` Maxime Devos
  2022-07-24 10:31   ` ( via Guix-patches via
  1 sibling, 0 replies; 13+ messages in thread
From: Maxime Devos @ 2022-07-23 22:27 UTC (permalink / raw)
  To: Joeke de Graaf, 56668


[-- Attachment #1.1.1: Type: text/plain, Size: 630 bytes --]

On 24-07-2022 00:14, Joeke de Graaf wrote:

> The application seems to expect GTK icons to be in a certain place and 
> it's not finding them.
> It's not immediately obvious to me what the solution for this is, but 
> I gather from your previous e-mail that this is a known and fixable 
> problem. 

Maybe have a look at how the inkscape package wraps things (search for 
GDK_PIXBUF_MODULE_FILE), maybe also search for glib-or-gtk-wrap, maybe 
GI_TYPELIB_PATH but probably not, perhaps XDG_DATA_DIRS (see e.g. icedove).

I'm not sure which of them is important, but my guess is XDG_DATA_DIRS.

Greetings,
Maxime


[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 929 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [bug#56668] [PATCH] gnu: Add wavbreaker
  2022-07-23 22:14 ` Joeke de Graaf
  2022-07-23 22:27   ` Maxime Devos
@ 2022-07-24 10:31   ` ( via Guix-patches via
  2022-07-24 21:13     ` Maxime Devos
  1 sibling, 1 reply; 13+ messages in thread
From: ( via Guix-patches via @ 2022-07-24 10:31 UTC (permalink / raw)
  To: Joeke de Graaf, 56668

On Sat Jul 23, 2022 at 11:14 PM BST, Joeke de Graaf wrote:
> It seems that in the package's current state, it does not like being run 
> in a pure environment, it simply crashes.
> The application seems to expect GTK icons to be in a certain place and 
> it's not finding them.
> It's not immediately obvious to me what the solution for this is, but I 
> gather from your previous e-mail that this is a known and fixable 
> problem.

You should be able to fix this by adding the hicolor-icon-theme package
to native-inputs.

    -- (




^ permalink raw reply	[flat|nested] 13+ messages in thread

* [bug#56668] [PATCH] gnu: Add wavbreaker
  2022-07-20 12:07 [bug#56668] [PATCH] gnu: Add wavbreaker Joeke de Graaf
                   ` (2 preceding siblings ...)
  2022-07-23 22:14 ` Joeke de Graaf
@ 2022-07-24 18:07 ` Joeke de Graaf
  2022-07-24 18:09 ` Joeke de Graaf
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 13+ messages in thread
From: Joeke de Graaf @ 2022-07-24 18:07 UTC (permalink / raw)
  To: 56668

On 24.07.2022 12:31, ( wrote:
> On Sat Jul 23, 2022 at 11:14 PM BST, Joeke de Graaf wrote:
>> It seems that in the package's current state, it does not like being 
>> run
>> in a pure environment, it simply crashes.
>> The application seems to expect GTK icons to be in a certain place and
>> it's not finding them.
>> It's not immediately obvious to me what the solution for this is, but 
>> I
>> gather from your previous e-mail that this is a known and fixable
>> problem.
> 
> You should be able to fix this by adding the hicolor-icon-theme package
> to native-inputs.
> 
>     -- (

Thanks, this fixed it.




^ permalink raw reply	[flat|nested] 13+ messages in thread

* [bug#56668] [PATCH] gnu: Add wavbreaker
  2022-07-20 12:07 [bug#56668] [PATCH] gnu: Add wavbreaker Joeke de Graaf
                   ` (3 preceding siblings ...)
  2022-07-24 18:07 ` Joeke de Graaf
@ 2022-07-24 18:09 ` Joeke de Graaf
  2022-07-24 23:06 ` Joeke de Graaf
  2022-07-27 23:43 ` Joeke de Graaf
  6 siblings, 0 replies; 13+ messages in thread
From: Joeke de Graaf @ 2022-07-24 18:09 UTC (permalink / raw)
  To: 56668

[-- Attachment #1: Type: text/plain, Size: 22 bytes --]

Here is the new patch.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-wavbreaker.patch --]
[-- Type: text/x-patch; name=0001-gnu-Add-wavbreaker.patch, Size: 2424 bytes --]

diff --git a/gnu/packages/mp3.scm b/gnu/packages/mp3.scm
index 4a8bdad711..f3b4df4b8c 100644
--- a/gnu/packages/mp3.scm
+++ b/gnu/packages/mp3.scm
@@ -10,6 +10,7 @@
 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
 ;;; Copyright © 2021 Simon Streit <simon@netpanic.org>
 ;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
+;;; Copyright © 2022 Joeke de Graaf <joeke@posteo.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -50,13 +51,16 @@ (define-module (gnu packages mp3)
   #:use-module (gnu packages pulseaudio)
   #:use-module (gnu packages linux)               ;alsa-lib
   #:use-module (gnu packages video)               ;ffmpeg
+  #:use-module (gnu packages cmake)
+  #:use-module (gnu packages gnome)
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix git-download)
   #:use-module (guix utils)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system python)
-  #:use-module (guix build-system cmake))
+  #:use-module (guix build-system cmake)
+  #:use-module (guix build-system-meson))
 
 (define-public libmad
   (package
@@ -710,3 +714,30 @@ (define-public python-pytaglib
 cross-platform, works with all Python versions, and is very
 simple to use yet fully featured.")
     (license license:gpl3)))
+
+(define-public wavbreaker
+  (package
+    (name "wavbreaker")
+    (version "0.15")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/thp/wavbreaker/")
+                    (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32 "16h0sfcb8av6a368giizzwv9m0lq5c3bnf4b9vyyh9nkbbsc7c3j"))))
+    (build-system meson-build-system)
+    (native-inputs
+     (list pkg-config cmake hicolor-icon-theme))
+    (inputs (list glib gtk+ ao))
+    (home-page "https://wavbreaker.sourceforge.io/")
+    (synopsis "WAV and MP3 file splitter with a GUI")
+    (description
+     "Wavbreaker is a WAV and MP3 file splitter.  It can be used to
+break up a WAV or MP3 audio file into multiple WAV files.
+Wavbreaker contains a helpful waveform display of the audio file
+being edited, to help the user in splitting the file at the right
+point.  Wavbreaker also supports splitting MP3 files without
+re-encoding them, to preserve their original audio quality.")
+    (license license:gpl2+)))

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [bug#56668] [PATCH] gnu: Add wavbreaker
  2022-07-24 10:31   ` ( via Guix-patches via
@ 2022-07-24 21:13     ` Maxime Devos
  2022-07-24 21:26       ` Joeke de Graaf
  0 siblings, 1 reply; 13+ messages in thread
From: Maxime Devos @ 2022-07-24 21:13 UTC (permalink / raw)
  To: (, Joeke de Graaf, 56668


[-- Attachment #1.1.1.1: Type: text/plain, Size: 1128 bytes --]


On 24-07-2022 12:31, ( via Guix-patches via wrote:
> On Sat Jul 23, 2022 at 11:14 PM BST, Joeke de Graaf wrote:
>> It seems that in the package's current state, it does not like being run
>> in a pure environment, it simply crashes.
>> The application seems to expect GTK icons to be in a certain place and
>> it's not finding them.
>> It's not immediately obvious to me what the solution for this is, but I
>> gather from your previous e-mail that this is a known and fixable
>> problem.
> You should be able to fix this by adding the hicolor-icon-theme package
> to native-inputs.
>
>      -- (

This doesn't seem correct to me -- if it is a runtime thing (otherwise, 
how could it stop the crashes), it needs to be _inputs_, not 
_native-inputs_, for cross-compilation reasons. If you go for 
native-inputs anyways, check the references and make sure the icons 
don't end up in them.  Also, a comment on why this seemingly unneeded 
package is added would be in order (the package builds without, so some 
future reader could easily just remove the input for being unneeded).

Greetings,
Maxime.


[-- Attachment #1.1.1.2: Type: text/html, Size: 1895 bytes --]

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 929 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [bug#56668] [PATCH] gnu: Add wavbreaker
  2022-07-24 21:13     ` Maxime Devos
@ 2022-07-24 21:26       ` Joeke de Graaf
  0 siblings, 0 replies; 13+ messages in thread
From: Joeke de Graaf @ 2022-07-24 21:26 UTC (permalink / raw)
  To: 56668



On 24.07.2022 23:13, Maxime Devos wrote:
> On 24-07-2022 12:31, ( via Guix-patches via wrote:
> 
>> On Sat Jul 23, 2022 at 11:14 PM BST, Joeke de Graaf wrote:
>> 
>>> It seems that in the package's current state, it does not like
>>> being run
>>> in a pure environment, it simply crashes.
>>> The application seems to expect GTK icons to be in a certain place
>>> and
>>> it's not finding them.
>>> It's not immediately obvious to me what the solution for this is,
>>> but I
>>> gather from your previous e-mail that this is a known and fixable
>>> problem.
>> 
>> You should be able to fix this by adding the hicolor-icon-theme
>> package
>> to native-inputs.
>> 
>> -- (
> 
> This doesn't seem correct to me -- if it is a runtime thing
> (otherwise, how could it stop the crashes), it needs to be _inputs_,
> not _native-inputs_, for cross-compilation reasons. If you go for
> native-inputs anyways, check the references and make sure the icons
> don't end up in them.  Also, a comment on why this seemingly unneeded
> package is added would be in order (the package builds without, so
> some future reader could easily just remove the input for being
> unneeded).
> 
> Greetings,
>  Maxime.

You are right, adding hicolor-icon-theme as a native input did not 
resolve the issue.
While testing, I forgot to add --pure to the "guix shell" command.
I will attempt some other fixes.




^ permalink raw reply	[flat|nested] 13+ messages in thread

* [bug#56668] [PATCH] gnu: Add wavbreaker
  2022-07-20 12:07 [bug#56668] [PATCH] gnu: Add wavbreaker Joeke de Graaf
                   ` (4 preceding siblings ...)
  2022-07-24 18:09 ` Joeke de Graaf
@ 2022-07-24 23:06 ` Joeke de Graaf
  2022-07-27 23:43 ` Joeke de Graaf
  6 siblings, 0 replies; 13+ messages in thread
From: Joeke de Graaf @ 2022-07-24 23:06 UTC (permalink / raw)
  To: 56668

Just an update on this issue to avoid duplicate effort if someone else 
also tries to fix this later:

On Maxime Devos' suggestion, I looked into glib-or-gtk-wrap.
Looking at %standard-phases in the module (guix build 
meson-build-system) there is already a glib-or-gtk-wrap phase.
Adding this phase manually after the install phase does not help to fix 
the problem (as expected, though it was worth a shot).

Later this week (hopefully tomorrow) I will try some more of Maxime 
Devos' suggestions


Best regards,

Joeke de Graaf




^ permalink raw reply	[flat|nested] 13+ messages in thread

* [bug#56668] [PATCH] gnu: Add wavbreaker
  2022-07-20 12:07 [bug#56668] [PATCH] gnu: Add wavbreaker Joeke de Graaf
                   ` (5 preceding siblings ...)
  2022-07-24 23:06 ` Joeke de Graaf
@ 2022-07-27 23:43 ` Joeke de Graaf
  2022-08-06 20:42   ` bug#56668: " Ludovic Courtès
  6 siblings, 1 reply; 13+ messages in thread
From: Joeke de Graaf @ 2022-07-27 23:43 UTC (permalink / raw)
  To: 56668

[-- Attachment #1: Type: text/plain, Size: 388 bytes --]

I've modified my patch to make wavbreaker work in pure environments.

The only thing I haven't been able to fix is the program's own icon in 
Gnome's activity overview (the overview of open programs one gets when 
one presses the super key).
If wavbreaker is run in a pure environment, this icon does not show up. 
Otherwise, the program seems to run fine.


Best regards,

Joeke de Graaf

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 001-gnu-Add-wavbreaker.patch --]
[-- Type: text/x-patch; name=001-gnu-Add-wavbreaker.patch, Size: 4120 bytes --]

diff --git a/gnu/packages/mp3.scm b/gnu/packages/mp3.scm
index 4a8bdad711..35343a80d4 100644
--- a/gnu/packages/mp3.scm
+++ b/gnu/packages/mp3.scm
@@ -10,6 +10,7 @@
 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
 ;;; Copyright © 2021 Simon Streit <simon@netpanic.org>
 ;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
+;;; Copyright © 2022 Joeke de Graaf <joeke@posteo.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -50,13 +51,17 @@ (define-module (gnu packages mp3)
   #:use-module (gnu packages pulseaudio)
   #:use-module (gnu packages linux)               ;alsa-lib
   #:use-module (gnu packages video)               ;ffmpeg
+  #:use-module (gnu packages cmake)
+  #:use-module (gnu packages bash)
+  #:use-module (gnu packages gnome)
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix git-download)
   #:use-module (guix utils)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system python)
-  #:use-module (guix build-system cmake))
+  #:use-module (guix build-system cmake)
+  #:use-module (guix build-system-meson))
 
 (define-public libmad
   (package
@@ -710,3 +715,61 @@ (define-public python-pytaglib
 cross-platform, works with all Python versions, and is very
 simple to use yet fully featured.")
     (license license:gpl3)))
+
+(define-public wavbreaker
+  (package
+    (name "wavbreaker")
+    (version "0.15")
+    (source (origin
+	      (method git-fetch)
+	      (uri (git-reference
+		    (url "https://github.com/thp/wavbreaker/")
+		    (commit version)))
+	      (file-name (git-file-name name version))
+	      (sha256
+	       (base32 "16h0sfcb8av6a368giizzwv9m0lq5c3bnf4b9vyyh9nkbbsc7c3j"))))
+    (build-system meson-build-system)
+    (native-inputs
+     (list pkg-config cmake))
+    (arguments
+     '(#:modules
+       ((guix build utils)
+	(guix build meson-build-system))
+
+       #:phases
+       (modify-phases %standard-phases
+	 (add-after 'install 'wrap-program
+	   ;; This wrapping is necessary to make wavbreaker find things it needs in pure environments
+	   (lambda* (#:key inputs outputs #:allow-other-keys)
+	     (let ((out (assoc-ref outputs "out"))
+		   (adwaita-icons (assoc-ref inputs "adwaita-icon-theme"))
+		   (hicolor-icons (assoc-ref inputs "hicolor-icon-theme"))
+		   (shared-mime (assoc-ref inputs "shared-mime-info")))
+	       (wrap-program (string-append out "/bin/wavbreaker")
+		 ;; Needed in order for wavbreakere to find the icons it needs
+		 `("XDG_DATA_DIRS" ":" prefix ,(map (lambda (package)
+                                                      (string-append package
+                                                                     "/share"))
+                                                    `(,out ;; For wavbreaker's icon
+                                                      ,adwaita-icons
+                                                      ,hicolor-icons
+                                                      ,shared-mime)))
+		 ;; This is necessary to load some pixbufs like Adwaita's check-symbolic.svg
+		 ;; and wavbreaker's own logo in the 'about' section
+		 `("GDK_PIXBUF_MODULE_FILE" =
+		   (,(getenv "GDK_PIXBUF_MODULE_FILE")))
+		 ;; Needed for GTK's file chooser to not crash
+		 `("GSETTINGS_SCHEMA_DIR" =
+                 (,(string-append (assoc-ref inputs "gtk+")
+                                  "/share/glib-2.0/schemas"))))))))))
+    (inputs (list glib gtk+ ao bash-minimal adwaita-icon-theme shared-mime-info hicolor-icon-theme gsettings-desktop-schemas))
+    (home-page "https://wavbreaker.sourceforge.io/")
+    (synopsis "WAV and MP3 file splitter with a GUI")
+    (description
+     "Wavbreaker is a WAV and MP3 file splitter.  It can be used to
+  break up a WAV or MP3 audio file into multiple WAV files.
+  Wavbreaker contains a helpful waveform display of the audio file
+  being edited, to help the user in splitting the file at the right
+  point.  Wavbreaker also supports splitting MP3 files without
+  re-encoding them, to preserve their original audio quality.")
+    (license license:gpl2+)))

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* bug#56668: [PATCH] gnu: Add wavbreaker
  2022-07-27 23:43 ` Joeke de Graaf
@ 2022-08-06 20:42   ` Ludovic Courtès
  0 siblings, 0 replies; 13+ messages in thread
From: Ludovic Courtès @ 2022-08-06 20:42 UTC (permalink / raw)
  To: Joeke de Graaf; +Cc: Maxime Devos, 56668-done

[-- Attachment #1: Type: text/plain, Size: 874 bytes --]

Hi Joeke,

Joeke de Graaf <joeke@posteo.net> skribis:

> I've modified my patch to make wavbreaker work in pure environments.
>
> The only thing I haven't been able to fix is the program's own icon in
> Gnome's activity overview (the overview of open programs one gets when
> one presses the super key).
> If wavbreaker is run in a pure environment, this icon does not show
> up. Otherwise, the program seems to run fine.

Sounds good.  Applied with the formatting changes below: keeping inputs
fields next to one another, avoiding long lines, replacing tabulations
with spaces (as suggested by ‘guix lint’), and removing extra space from
the description.  I also added a commit log that follows our
conventions¹.

Thank you, and thanks Maxime for reviewing!

Ludo’.

¹ https://guix.gnu.org/manual/devel/en/html_node/Submitting-Patches.html


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 5386 bytes --]

diff --git a/gnu/packages/mp3.scm b/gnu/packages/mp3.scm
index 406ebb9233..e2b112832b 100644
--- a/gnu/packages/mp3.scm
+++ b/gnu/packages/mp3.scm
@@ -752,55 +752,64 @@ (define-public wavbreaker
     (name "wavbreaker")
     (version "0.15")
     (source (origin
-	      (method git-fetch)
-	      (uri (git-reference
-		    (url "https://github.com/thp/wavbreaker/")
-		    (commit version)))
-	      (file-name (git-file-name name version))
-	      (sha256
-	       (base32 "16h0sfcb8av6a368giizzwv9m0lq5c3bnf4b9vyyh9nkbbsc7c3j"))))
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/thp/wavbreaker/")
+                    (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32 "16h0sfcb8av6a368giizzwv9m0lq5c3bnf4b9vyyh9nkbbsc7c3j"))))
     (build-system meson-build-system)
-    (native-inputs
-     (list pkg-config cmake))
     (arguments
      '(#:modules
        ((guix build utils)
-	(guix build meson-build-system))
+        (guix build meson-build-system))
 
        #:phases
        (modify-phases %standard-phases
-	 (add-after 'install 'wrap-program
-	   ;; This wrapping is necessary to make wavbreaker find things it needs in pure environments
-	   (lambda* (#:key inputs outputs #:allow-other-keys)
-	     (let ((out (assoc-ref outputs "out"))
-		   (adwaita-icons (assoc-ref inputs "adwaita-icon-theme"))
-		   (hicolor-icons (assoc-ref inputs "hicolor-icon-theme"))
-		   (shared-mime (assoc-ref inputs "shared-mime-info")))
-	       (wrap-program (string-append out "/bin/wavbreaker")
-		 ;; Needed in order for wavbreakere to find the icons it needs
-		 `("XDG_DATA_DIRS" ":" prefix ,(map (lambda (package)
-                                                      (string-append package
-                                                                     "/share"))
-                                                    `(,out ;; For wavbreaker's icon
-                                                      ,adwaita-icons
-                                                      ,hicolor-icons
-                                                      ,shared-mime)))
-		 ;; This is necessary to load some pixbufs like Adwaita's check-symbolic.svg
-		 ;; and wavbreaker's own logo in the 'about' section
-		 `("GDK_PIXBUF_MODULE_FILE" =
-		   (,(getenv "GDK_PIXBUF_MODULE_FILE")))
-		 ;; Needed for GTK's file chooser to not crash
-		 `("GSETTINGS_SCHEMA_DIR" =
+         (add-after 'install 'wrap-program
+           ;; This wrapping is necessary to make wavbreaker find things it
+           ;; needs in pure environments.
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out"))
+                   (adwaita-icons (assoc-ref inputs "adwaita-icon-theme"))
+                   (hicolor-icons (assoc-ref inputs "hicolor-icon-theme"))
+                   (shared-mime (assoc-ref inputs "shared-mime-info")))
+               (wrap-program (string-append out "/bin/wavbreaker")
+                 ;; Needed in order for wavbreakere to find the icons it needs
+                 `("XDG_DATA_DIRS" ":" prefix
+                   ,(map (lambda (package)
+                           (string-append package "/share"))
+                         `(,out                   ;for wavbreaker's icon
+                           ,adwaita-icons
+                           ,hicolor-icons
+                           ,shared-mime)))
+                 ;; This is necessary to load some pixbufs like Adwaita's
+                 ;; check-symbolic.svg and wavbreaker's own logo in the
+                 ;; 'about' section.
+                 `("GDK_PIXBUF_MODULE_FILE" =
+                   (,(getenv "GDK_PIXBUF_MODULE_FILE")))
+                 ;; Needed for GTK's file chooser to not crash.
+                 `("GSETTINGS_SCHEMA_DIR" =
                  (,(string-append (assoc-ref inputs "gtk+")
                                   "/share/glib-2.0/schemas"))))))))))
-    (inputs (list glib gtk+ ao bash-minimal adwaita-icon-theme shared-mime-info hicolor-icon-theme gsettings-desktop-schemas))
+    (native-inputs
+     (list pkg-config cmake))
+    (inputs
+     (list glib
+           gtk+
+           ao
+           bash-minimal
+           adwaita-icon-theme
+           shared-mime-info
+           hicolor-icon-theme
+           gsettings-desktop-schemas))
     (home-page "https://wavbreaker.sourceforge.io/")
     (synopsis "WAV and MP3 file splitter with a GUI")
     (description
-     "Wavbreaker is a WAV and MP3 file splitter.  It can be used to
-  break up a WAV or MP3 audio file into multiple WAV files.
-  Wavbreaker contains a helpful waveform display of the audio file
-  being edited, to help the user in splitting the file at the right
-  point.  Wavbreaker also supports splitting MP3 files without
-  re-encoding them, to preserve their original audio quality.")
+     "Wavbreaker is a WAV and MP3 file splitter.  It can be used to break up a
+WAV or MP3 audio file into multiple WAV files.  Wavbreaker contains a helpful
+waveform display of the audio file being edited, to help the user in splitting
+the file at the right point.  Wavbreaker also supports splitting MP3 files
+without re-encoding them, to preserve their original audio quality.")
     (license license:gpl2+)))

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2022-08-06 20:43 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-20 12:07 [bug#56668] [PATCH] gnu: Add wavbreaker Joeke de Graaf
2022-07-23 19:50 ` Maxime Devos
2022-07-23 19:51 ` Maxime Devos
2022-07-23 22:14 ` Joeke de Graaf
2022-07-23 22:27   ` Maxime Devos
2022-07-24 10:31   ` ( via Guix-patches via
2022-07-24 21:13     ` Maxime Devos
2022-07-24 21:26       ` Joeke de Graaf
2022-07-24 18:07 ` Joeke de Graaf
2022-07-24 18:09 ` Joeke de Graaf
2022-07-24 23:06 ` Joeke de Graaf
2022-07-27 23:43 ` Joeke de Graaf
2022-08-06 20:42   ` bug#56668: " Ludovic Courtès

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.