From d3cba2f0496cba4805589f597be2e0398e50ed10 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Tue, 29 Jul 2025 16:43:17 +0200 Subject: [PATCH] vhost-device-sound: init at 0.2.0 All the vhost-device programs are in a single repository and Cargo workspace, but they do separate release tags for each one. From this, I'm inferring that it makes the most sense to package them separately. --- .../by-name/vh/vhost-device-sound/package.nix | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 pkgs/by-name/vh/vhost-device-sound/package.nix diff --git a/pkgs/by-name/vh/vhost-device-sound/package.nix b/pkgs/by-name/vh/vhost-device-sound/package.nix new file mode 100644 index 000000000000..6fc0353a715d --- /dev/null +++ b/pkgs/by-name/vh/vhost-device-sound/package.nix @@ -0,0 +1,48 @@ +{ + lib, + rustPlatform, + fetchFromGitHub, + pkg-config, + alsa-lib, + pipewire, +}: + +rustPlatform.buildRustPackage (finalAttrs: { + pname = "vhost-device-sound"; + version = "0.2.0"; + + src = fetchFromGitHub { + owner = "rust-vmm"; + repo = "vhost-device"; + tag = "vhost-device-sound-v${finalAttrs.version}"; + hash = "sha256-MJRjnJewT1kyy37QzjJ0OToEwdZMZkKxtbyGees/vYU="; + }; + + cargoHash = "sha256-PXJZouhPeylpqX/FLY7pmX+eV+IanRqHSwaJriXFhw8="; + + nativeBuildInputs = [ + pkg-config + rustPlatform.bindgenHook + ]; + buildInputs = [ + alsa-lib + pipewire + ]; + + cargoBuildFlags = "-p vhost-device-sound"; + cargoTestFlags = "-p vhost-device-sound"; + + # Runs dbus-daemon, which tries to load config from /etc. + doCheck = false; + + meta = { + homepage = "https://github.com/rust-vmm/vhost-device/tree/main/vhost-device-sound"; + description = "virtio-sound device using the vhost-user protocol"; + license = [ + lib.licenses.asl20 + lib.licenses.bsd3 + ]; + maintainers = [ lib.maintainers.qyliss ]; + platforms = lib.platforms.unix; + }; +})