diff mbox series

[bug#72142] add python-rtmidi

Message ID 20240716152423.17557-1-ikbenrickhuyzer@gmail.com
State New
Headers show
Series [bug#72142] add python-rtmidi | expand

Commit Message

Rick Huijzer July 16, 2024, 3:23 p.m. UTC
---
I've run guix lint and should be fine. I'm having a bit of a hard time with formatting so I will probaby have to recreate the perfect setup from the documentation.
Packaging python-rtmidi in an effort to bring a complete DMX workflow to guix.

 gnu/packages/python-xyz.scm | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)


base-commit: 3c58b759a51072aabd7eaaca680674a0c2b36c23

Comments

Rick Huijzer July 18, 2024, 8:54 p.m. UTC | #1
Hi,

I will look into the propagated inputs question. Indeed looking at the
documentation python does not belong there.

Your example works at a foreign distro using guix (Fedora) with jack, which
is where I've tested the declaration. On Guix system it seems to work when
using the PipeWire Home Service, but I can't get it to work with the
standalone jack2 just yet.  So that's something I've got to look into as
well.

It wasn't my intention to submit a poorly working patch, sorry. Somewhere
next week probably I will compose a new patch revision.
Rick Huijzer Aug. 6, 2024, 1:28 p.m. UTC | #2
Hi,

I've installed guix-system and did some further testing:

The package seems to work just fine when properly installing jack2,
pipewire (pw-jack) or jack on guix-system (and Fedora). It's possible to
put jack (v1) in the propagated inputs, but that's not that elegant I
suppose. Furthermore all the audio packages I could find in guix include
jack in the same way, at build time and not as a propagated input.

I cannot test this with actual midi hardware, only with the
midiout.open_virtual_port method. But for my use case (using the OLA
suite), the library works fine, even when using real DMX controller
hardware.

So after testing and configuring my system properly, I have found no reason
for a revised patch. If you or someone else wants to take a look at this
patch, please do.

Thanks.
Rick Huijzer Sept. 2, 2024, 8:07 p.m. UTC | #3
Hi,

Could someone have a look at this? It builds and works. Feedback is much
appreciated.
diff mbox series

Patch

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 4d7ddeb9d7..8f8cf4a1a8 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -24710,6 +24710,32 @@  (define-public python-sacn
      a network.")
     (license license:expat)))
 
+(define-public python-rtmidi
+  (package
+    (name "python-rtmidi")
+    (version "1.5.8")
+    (source 
+      (origin
+       (method url-fetch)
+       (uri (pypi-uri "python_rtmidi" version))
+       (sha256
+        (base32 "1yh4s124awzwhfg49m8s6qsa58qxabljlmnb1q00kbk8n1ldx6kz"))))
+    (build-system meson-build-system)
+    (inputs
+      (list glibc
+            python-cffi
+            jack-2
+            boost
+            rtmidi))
+    (native-inputs (list python python-pytest pkg-config python-setuptools))
+    (home-page "https://pypi.org/project/python-rtmidi/")
+    (synopsis "Python bindings for RtMidi")
+    (description
+    "Python-rtmidi is a Python binding for RtMidi, a set of C++ classes that provides
+    a common API for real-time MIDI input/output across Linux (ALSA & JACK), macOS,
+    and Windows (Multimedia Library).")
+    (license license:expat)))
+
 (define-public python-bagit
   (package
     (name "python-bagit")