gnu: Add python-sounddevice.

* gnu/packages/audio.scm (python-sounddevice): New variable.

Change-Id: Ia4bb0b52aab812232f82ca299b29e429d07007ce
This commit is contained in:
Evgenii Klimov 2025-09-25 21:30:06 +01:00
parent a49269fd42
commit 055f7c5d6b
No known key found for this signature in database
GPG key ID: 488553995AF96EB8

View file

@ -57,6 +57,7 @@
;;; Copyright © 2025 Kjartan Oli Agustsson <kjartanoli@outlook.com>
;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2025 Antoine Côté <antoine.cote@posteo.net>
;;; Copyright © 2025 Evgenii Klimov <eugene.dev@lipklim.org>
;;;
;;; This file is part of GNU Guix.
;;;
@ -247,6 +248,40 @@ promoting the market for advanced audio.")
(home-page "https://www.khronos.org/opensles/")
(license (license:non-copyleft "file:///LICENSE.txt"))))
(define-public python-sounddevice
(package
(name "python-sounddevice")
(version "0.5.2")
(source
(origin
(method url-fetch)
(uri (pypi-uri "sounddevice" version))
(sha256
(base32 "0jcb8kzlv8vyp9wrznii3pv4gjcpr1f9f6jyzbqdc8p9shdxad66"))))
(build-system pyproject-build-system)
(arguments
(list #:tests? #false ; no tests
#:phases
#~(modify-phases %standard-phases
(add-after 'patch-generated-file-shebangs 'add-path-to-portaudio
(lambda* (#:key inputs #:allow-other-keys)
(substitute*
"sounddevice.py"
(("_find_library\\(_libname\\)")
(string-append "\""
(search-input-file inputs
"/lib/libportaudio.so.2")
"\""))))))))
(inputs (list portaudio))
(propagated-inputs (list python-cffi python-numpy))
(native-inputs (list python-setuptools python-wheel))
(home-page "https://python-sounddevice.readthedocs.io/")
(synopsis "Play and record sound with Python")
(description "This Python module provides bindings for the PortAudio
library and a few convenience functions to play and record NumPy arrays
containing audio signals.")
(license license:expat)))
(define-public wildmidi
(package
(name "wildmidi")