gnu: Add rust-alsa-0.9.

* gnu/packages/crates-audio.scm (rust-alsa-0.9): New variable.
(rust-alsa-0.8): Inherit from rust-alsa-0.9.

Change-Id: I83904bb57c13f5e41d057a5f57100c81f3b20e94
This commit is contained in:
Efraim Flashner 2024-12-30 18:30:28 +02:00
parent 9e02124778
commit 47333fe4c2
No known key found for this signature in database
GPG key ID: 41AAE7DCCA3D8351

View file

@ -48,8 +48,47 @@ (define-module (gnu packages crates-audio)
;;; Please: Try to add new module packages in alphabetic order. ;;; Please: Try to add new module packages in alphabetic order.
;;; ;;;
(define-public rust-alsa-0.9
(package
(name "rust-alsa")
(version "0.9.1")
(source
(origin
(method url-fetch)
(uri (crate-uri "alsa" version))
(file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32 "0hvxc447bsynyhzhmznw6w2kwbid83p712dls4h1x8w3pavp4xgd"))))
(build-system cargo-build-system)
(arguments
`(#:cargo-test-flags
(list "--"
;; 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"
"--skip=src/pcm.rs - pcm (line 6)")
#:cargo-inputs (("rust-alsa-sys" ,rust-alsa-sys-0.3)
("rust-bitflags" ,rust-bitflags-2)
("rust-cfg-if" ,rust-cfg-if-1)
("rust-libc" ,rust-libc-0.2))))
(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.8 (define-public rust-alsa-0.8
(package (package
(inherit rust-alsa-0.9)
(name "rust-alsa") (name "rust-alsa")
(version "0.8.1") (version "0.8.1")
(source (origin (source (origin
@ -59,7 +98,6 @@ (define-public rust-alsa-0.8
(sha256 (sha256
(base32 (base32
"02pzlq2q8ml28ikvkvm77bwdqmi22d6ak1qvrc0cr6yjb9adwd6f")))) "02pzlq2q8ml28ikvkvm77bwdqmi22d6ak1qvrc0cr6yjb9adwd6f"))))
(build-system cargo-build-system)
(arguments (arguments
`(#:cargo-test-flags `(#:cargo-test-flags
(list "--release" (list "--release"
@ -77,15 +115,7 @@ (define-public rust-alsa-0.8
#:cargo-inputs (("rust-alsa-sys" ,rust-alsa-sys-0.3) #:cargo-inputs (("rust-alsa-sys" ,rust-alsa-sys-0.3)
("rust-bitflags" ,rust-bitflags-2) ("rust-bitflags" ,rust-bitflags-2)
("rust-libc" ,rust-libc-0.2) ("rust-libc" ,rust-libc-0.2)
("rust-nix" ,rust-nix-0.26)))) ("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 (define-public rust-alsa-0.7
(package (package