Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
92 lines
1.7 KiB
Nix
92 lines
1.7 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitLab,
|
|
meson,
|
|
ninja,
|
|
pkg-config,
|
|
buildPackages,
|
|
libGLU,
|
|
libepoxy,
|
|
libX11,
|
|
libdrm,
|
|
libgbm,
|
|
libva,
|
|
vulkan-headers,
|
|
vulkan-loader,
|
|
nix-update-script,
|
|
vulkanSupport ? stdenv.hostPlatform.isLinux,
|
|
nativeContextSupport ? stdenv.hostPlatform.isLinux,
|
|
vaapiSupport ? !stdenv.hostPlatform.isDarwin,
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "virglrenderer";
|
|
version = "1.2.0";
|
|
|
|
src = fetchFromGitLab {
|
|
domain = "gitlab.freedesktop.org";
|
|
owner = "virgl";
|
|
repo = "virglrenderer";
|
|
tag = finalAttrs.version;
|
|
hash = "sha256-5Ok5ctJ3kcBH05URctvZ0hCZA/o59r2KsAOJYoiWMHs=";
|
|
};
|
|
|
|
separateDebugInfo = true;
|
|
|
|
nativeBuildInputs = [
|
|
meson
|
|
ninja
|
|
pkg-config
|
|
(buildPackages.python3.withPackages (ps: [
|
|
ps.pyyaml
|
|
]))
|
|
];
|
|
|
|
buildInputs = [
|
|
libepoxy
|
|
]
|
|
++ lib.optionals stdenv.hostPlatform.isLinux [
|
|
libGLU
|
|
libX11
|
|
libdrm
|
|
libgbm
|
|
]
|
|
++ lib.optionals vaapiSupport [
|
|
libva
|
|
]
|
|
++ lib.optionals vulkanSupport [
|
|
vulkan-headers
|
|
vulkan-loader
|
|
];
|
|
|
|
mesonFlags = [
|
|
(lib.mesonBool "video" vaapiSupport)
|
|
(lib.mesonBool "venus" vulkanSupport)
|
|
(lib.mesonOption "drm-renderers" (
|
|
lib.optionalString nativeContextSupport (
|
|
lib.concatStringsSep "," [
|
|
"amdgpu-experimental"
|
|
"asahi"
|
|
"msm"
|
|
]
|
|
)
|
|
))
|
|
];
|
|
|
|
passthru = {
|
|
updateScript = nix-update-script { };
|
|
};
|
|
|
|
meta = {
|
|
description = "Virtual 3D GPU for use inside QEMU virtual machines";
|
|
homepage = "https://docs.mesa3d.org/drivers/virgl";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [
|
|
normalcea
|
|
];
|
|
mainProgram = "virgl_test_server";
|
|
platforms = lib.platforms.unix;
|
|
};
|
|
})
|