summaryrefslogtreecommitdiff
path: root/gnu/packages/crates-audio.scm
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2024-12-26 19:44:39 +0200
committerEfraim Flashner <efraim@flashner.co.il>2025-01-06 12:19:29 +0200
commit07328748ffb987f595abf3e58ef85c7e19fac354 (patch)
tree1c2bb1ac9c1f57b7881ceb7c897af9690b6cfc86 /gnu/packages/crates-audio.scm
parentc60dc42ed0e3044809312441138921ba42258cc8 (diff)
gnu: rust-alsa: Move to (gnu packages crates-audio).
* gnu/packages/crates-io.scm (rust-alsa-0.8, rust-alsa-0.7, rust-alsa-0.6, rust-alsa-sys-0.3): Move from here ... * gnu/packages/crates-audio.scm: ... to here. Change-Id: Icbea7658edc50d92146525ee4ce28ded8fa6cf2d
Diffstat (limited to 'gnu/packages/crates-audio.scm')
-rw-r--r--gnu/packages/crates-audio.scm126
1 files changed, 126 insertions, 0 deletions
diff --git a/gnu/packages/crates-audio.scm b/gnu/packages/crates-audio.scm
index 4432b0ead3..5f2d9aa750 100644
--- a/gnu/packages/crates-audio.scm
+++ b/gnu/packages/crates-audio.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2021 Petr Hodina <phodina@protonmail.com>
;;; Copyright © 2023 Steve George <steve@futurile.net>
;;; Copyright © 2023 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2023 Jaeme Sifat <jaeme@runbox.com>
;;; Copyright © 2024 Roman Scherer <roman@burningswell.com>
;;;
;;; This file is part of GNU Guix.
@@ -45,6 +46,131 @@
;;; Please: Try to add new module packages in alphabetic order.
;;;
+(define-public rust-alsa-0.8
+ (package
+ (name "rust-alsa")
+ (version "0.8.1")
+ (source (origin
+ (method url-fetch)
+ (uri (crate-uri "alsa" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "02pzlq2q8ml28ikvkvm77bwdqmi22d6ak1qvrc0cr6yjb9adwd6f"))))
+ (build-system cargo-build-system)
+ (arguments
+ `(#:cargo-test-flags
+ (list "--release"
+ ;; Not the doc tests.
+ "--lib" "--bins" "--tests" "--"
+ ;; These try to use the audio interface
+ "--skip=pcm::drop"
+ "--skip=pcm::info_from_default"
+ "--skip=pcm::playback_to_default"
+ "--skip=pcm::record_from_default"
+ "--skip=seq::print_seqs"
+ "--skip=seq::seq_loopback"
+ "--skip=seq::seq_portsubscribeiter"
+ "--skip=seq::seq_subscribe")
+ #:cargo-inputs (("rust-alsa-sys" ,rust-alsa-sys-0.3)
+ ("rust-bitflags" ,rust-bitflags-2)
+ ("rust-libc" ,rust-libc-0.2)
+ ("rust-nix" ,rust-nix-0.26))))
+ (inputs (list alsa-lib))
+ (native-inputs (list pkg-config))
+ (home-page "https://github.com/diwic/alsa-rs")
+ (synopsis "Thin and safe wrapper around ALSA")
+ (description "A thin and safe wrapper around ALSA. Provides APIs for many
+parts of ALSA including audio playback, audio recording, HCtl API, raw MIDI and
+MIDI sequencer.")
+ (license (list license:asl2.0 license:expat))))
+
+(define-public rust-alsa-0.7
+ (package
+ (inherit rust-alsa-0.8)
+ (name "rust-alsa")
+ (version "0.7.1")
+ (source (origin
+ (method url-fetch)
+ (uri (crate-uri "alsa" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0iwbdgb6lr81iji9sr4f91mys24pia5avnkgbkv8kxzhvkc2lmp2"))))
+ (arguments
+ (list #:cargo-test-flags `(list "--release"
+ ;; Not the doc tests.
+ "--lib" "--bins" "--tests"
+ "--"
+ ;; These try to use the audio interface
+ "--skip=pcm::drop"
+ "--skip=pcm::info_from_default"
+ "--skip=pcm::playback_to_default"
+ "--skip=pcm::record_from_default"
+ "--skip=seq::print_seqs"
+ "--skip=seq::seq_loopback"
+ "--skip=seq::seq_portsubscribeiter"
+ "--skip=seq::seq_subscribe")
+ #:cargo-inputs `(("rust-alsa-sys" ,rust-alsa-sys-0.3)
+ ("rust-bitflags" ,rust-bitflags-1)
+ ("rust-libc" ,rust-libc-0.2)
+ ("rust-nix" ,rust-nix-0.24))))))
+
+(define-public rust-alsa-0.6
+ (package
+ (inherit rust-alsa-0.7)
+ (name "rust-alsa")
+ (version "0.6.0")
+ (source (origin
+ (method url-fetch)
+ (uri (crate-uri "alsa" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0szx8finhqbffh08fp3bgh4ywz0b572vcdyh4hwyhrfgw8pza5ar"))))
+ (arguments
+ (list #:cargo-test-flags `(list "--release"
+ ;; Not the doc tests.
+ "--lib" "--bins" "--tests"
+ "--"
+ ;; These try to use the audio interface
+ "--skip=pcm::drop"
+ "--skip=pcm::info_from_default"
+ "--skip=pcm::playback_to_default"
+ "--skip=pcm::record_from_default"
+ "--skip=seq::print_seqs"
+ "--skip=seq::seq_loopback"
+ "--skip=seq::seq_portsubscribeiter"
+ "--skip=seq::seq_subscribe")
+ #:cargo-inputs `(("rust-alsa-sys" ,rust-alsa-sys-0.3)
+ ("rust-bitflags" ,rust-bitflags-1)
+ ("rust-libc" ,rust-libc-0.2)
+ ("rust-nix" ,rust-nix-0.23))))))
+
+(define-public rust-alsa-sys-0.3
+ (package
+ (name "rust-alsa-sys")
+ (version "0.3.1")
+ (source (origin
+ (method url-fetch)
+ (uri (crate-uri "alsa-sys" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "09qmmnpmlcj23zcgx2xsi4phcgm5i02g9xaf801y7i067mkfx3yv"))))
+ (build-system cargo-build-system)
+ (arguments
+ (list #:tests? #f ; doc tests fail
+ #:cargo-inputs `(("rust-libc" ,rust-libc-0.2)
+ ("rust-pkg-config" ,rust-pkg-config-0.3))))
+ (native-inputs (list pkg-config alsa-lib))
+ (home-page "https://github.com/diwic/alsa-sys")
+ (synopsis "FFI bindings for the ALSA sound API")
+ (description
+ "FFI bindings for the ALSA sound API. This package contains
+the code to interact with the underlying operating system ALSA interface.")
+ (license license:expat)))
+
(define-public rust-asio-sys-0.2
(package
(name "rust-asio-sys")