Use our vhost fork for all crates. It has SHMEM and GPU backend support. Add a Nix flake package for vhost-device-gpu with the virgl backend enabled. Also fixes duplicate imports in vhost-device-gpu/src/backend/virgl.rs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
47 lines
863 B
Nix
47 lines
863 B
Nix
{
|
|
lib,
|
|
rustPlatform,
|
|
pkg-config,
|
|
virglrenderer,
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage (finalAttrs: {
|
|
pname = "vhost-device-gpu";
|
|
version = "0.2.0";
|
|
|
|
src = lib.cleanSource ./..;
|
|
|
|
cargoHash = "sha256-IJ7H5T3f4rCcnrlC6ihbcKWtYAY44sdY1gMgVq7PylU=";
|
|
|
|
nativeBuildInputs = [
|
|
pkg-config
|
|
rustPlatform.bindgenHook
|
|
];
|
|
buildInputs = [
|
|
virglrenderer
|
|
];
|
|
|
|
cargoBuildFlags = [
|
|
"--package"
|
|
"vhost-device-gpu"
|
|
];
|
|
cargoTestFlags = [
|
|
"--package"
|
|
"vhost-device-gpu"
|
|
];
|
|
|
|
buildNoDefaultFeatures = true;
|
|
buildFeatures = [ "backend-virgl" ];
|
|
|
|
doCheck = false;
|
|
|
|
meta = {
|
|
homepage = "https://git.dsg.is/dsg/vhost-device";
|
|
description = "virtio-gpu device using the vhost-user protocol (vmsilo fork)";
|
|
license = [
|
|
lib.licenses.asl20
|
|
lib.licenses.bsd3
|
|
];
|
|
platforms = lib.platforms.linux;
|
|
};
|
|
})
|