diff mbox series

[bug#74251] Adding jack-mixer audio package

Message ID 87y11pxn4a.fsf@subvertising.org
State New
Headers show
Series [bug#74251] Adding jack-mixer audio package | expand

Commit Message

Divya Ranjan Nov. 12, 2024, 1:21 a.m. UTC
Ekaitz Zarraga <ekaitz@elenq.tech> writes:

> On 2024-11-11 20:42, Divya Ranjan wrote:
>> Ekaitz Zarraga <ekaitz@elenq.tech> writes:
>> 
>>> Sorry mate I didn't explain it properly.
>>>
>>> The commit message has two parts: a title and a body.
>>>
>>> The title you used before was correct, you were only missing the
>>> body. This is how the whole commit message should look like:
>>>
>>> gnu: audio: Add jack-mixer
>>>
>>> * gnu/packages/audio.scm (jack-mixer): New variable.
>>>
>> Okay, I think this is the final patch.
>> Regards,
>
> Yes, this is almost there but there are still a couple of warnings by
> `guix lint`:
>
> 	jack-mixer@19: the source file name should contain the package name
>
> This is complaining because when it clones the source code it is
> called "jack_mixer" but your package is called "jack-mixer"
> instead. You could fix it using something like this in the `origin`:
>
> 	(file-name (git-file-name name version))
>
> If you add that and fix the indentation (you can use `guix style` for
> that), I think this is ready to go.
>
> You are almost there!
>
> PS: The other warning I think we can ignore for the moment. We have
> some other packages with the same warning I think it's because of the
> expansion of the `(,gtk+ "bin")
>

Added the necessary changes.

Regards,
diff mbox series

Patch

From df1ddf6d262f432f6b777cd6b9999679679749a8 Mon Sep 17 00:00:00 2001
From: Divya Ranjan <divya@subvertising.org>
Date: Mon, 11 Nov 2024 23:44:44 +0000
Subject: [PATCH] gnu: audio: Add jack-mixer

* gnu/packages/audio.scm (jack-mixer): New variable

Change-Id: I0b278f8674c84a4f43f9d23afc900b0a53e11f7c
---
 gnu/packages/audio.scm | 59 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 59 insertions(+)

diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index 467dc4a74f..8ef87264a0 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -2772,6 +2772,65 @@  (define-public jacktrip
 audio signal streaming.")
     (license (list license:gpl3+ license:lgpl3 license:expat))))
 
+(define-public jack-mixer
+  (package
+    (name "jack-mixer")
+    (version "19")
+    (source
+     (origin
+       (file-name (git-file-name name version))
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/jack-mixer/jack_mixer")
+             (commit (string-append "release-" version))))
+       (sha256
+        (base32 "18m6a9asbwaslw418i2w04kgc6jgdpw01i3kawdqy903kw66hnhj"))))
+    (build-system meson-build-system)
+    (arguments
+     (list
+      #:build-type "release"
+      #:phases #~(modify-phases %standard-phases
+                   (add-after 'unpack 'path-patch
+                     (lambda _
+                       (substitute* '("meson.build")
+                         (("'/', 'etc', 'xdg'")
+                          (string-append "'"
+                                         #$output "'")))))
+                   (add-after 'install 'wrap-path
+                     (lambda* (#:key outputs #:allow-other-keys)
+                       (let* ((out (assoc-ref outputs "out"))
+                              (bin (string-append out "/bin/"))
+                              (gi-typelib-path (getenv "GI_TYPELIB_PATH"))
+                              (version #$(version-major+minor (package-version
+                                                               (this-package-input
+                                                                "python"))))
+                              (lib (string-append out "/lib/python" version
+                                                  "/site-packages")))
+                         (wrap-program (string-append bin "jack_mixer")
+                           `("GUIX_PYTHONPATH" ":" prefix
+                             (,(getenv "GUIX_PYTHONPATH") ,lib))
+                           `("GI_TYPELIB_PATH" ":" prefix
+                             (,gi-typelib-path)))))))))
+    (native-inputs (list pkg-config python-cython python-docutils
+                         gettext-minimal glib))
+    (inputs (list bash-minimal))
+    (propagated-inputs (list gtk+
+                             `(,gtk+ "bin")
+                             python
+                             python-wrapper
+                             python-pygobject
+                             python-pycairo
+                             python-platformdirs
+                             jack-2))
+    (synopsis
+     "JACK Mixer: A multi-channel audio mixer for the JACK Audio Connection Kit")
+    (description
+     "The jack_mixer is a GTK+ JACK audio mixer app with a look & handling
+similar to hardware mixing desks.  It has lot of useful features, apart
+from being able to mix multiple JACK audio streams.")
+    (home-page "https://rdio.space/jackmixer/")
+    (license license:gpl2+)))
+
 (define-public jalv
   (package
     (name "jalv")
-- 
2.46.0