libkrun-efi: init at 1.15.1, krunkit: init at 1.0.0 (Supersedes #416870) (#417062)

This commit is contained in:
Alyssa Ross
2025-10-22 13:36:03 +00:00
committed by GitHub
3 changed files with 181 additions and 0 deletions
+6
View File
@@ -21236,6 +21236,12 @@
githubId = 39039420;
name = "Quinn Dougherty";
};
quinneden = {
email = "quinn@qeden.dev";
github = "quinneden";
githubId = 125415641;
name = "Quinn Edenfield";
};
QuiNzX = {
name = "QuiNz-";
github = "QuiNzX";
+58
View File
@@ -0,0 +1,58 @@
{
cargo,
darwin,
pkg-config,
rustc,
stdenv,
fetchFromGitHub,
libepoxy,
libkrun-efi,
rustPlatform,
lib,
nix-update-script,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "krunkit";
version = "1.0.0";
src = fetchFromGitHub {
owner = "containers";
repo = "krunkit";
tag = "v${finalAttrs.version}";
hash = "sha256-dsEZZiLgHyd6xeXZCdDd4zsxzwQeIhAK+lewY2ZfvpY=";
};
cargoDeps = rustPlatform.fetchCargoVendor {
inherit (finalAttrs) src;
hash = "sha256-i0cC3aOEqcvOcwTPbM6AazMzd8Q+QLwuhnvPGv3ntsc=";
};
nativeBuildInputs = [
cargo
darwin.sigtool
pkg-config
rustc
rustPlatform.bindgenHook
rustPlatform.cargoSetupHook
];
buildInputs = [
libepoxy
libkrun-efi
];
makeFlags = [ "PREFIX=${placeholder "out"}" ];
# This is necessary in order for the binary to keep its entitlements
dontStrip = true;
passthru.updateScript = nix-update-script { };
meta = {
description = "Launch configurable virtual machines with libkrun";
homepage = "https://github.com/containers/krunkit";
license = lib.licenses.asl20;
platforms = [ "aarch64-darwin" ];
maintainers = with lib.maintainers; [ quinneden ];
};
})
+117
View File
@@ -0,0 +1,117 @@
{
cargo,
fetchFromGitHub,
fetchurl,
fixDarwinDylibNames,
lib,
libepoxy,
libkrun-efi,
moltenvk,
pkg-config,
rustc,
rustPlatform,
rutabaga_gfx,
nix-update-script,
stdenv,
buildPackages,
meson,
ninja,
vulkan-headers,
withGpu ? true,
}:
let
virglrenderer = stdenv.mkDerivation (finalAttrs: {
pname = "virglrenderer";
version = "0.10.4d-krunkit";
src = fetchurl {
url = "https://gitlab.freedesktop.org/slp/virglrenderer/-/archive/${finalAttrs.version}/virglrenderer-${finalAttrs.version}.tar.bz2";
hash = "sha256-M/buj97QUeY6CYeW0VICD5F6FBPi9ATPGHpNA48xL3o=";
};
separateDebugInfo = true;
buildInputs = [
libepoxy
moltenvk
vulkan-headers
];
nativeBuildInputs = [
meson
ninja
pkg-config
(buildPackages.python3.withPackages (ps: [ ps.pyyaml ]))
];
mesonFlags = [
(lib.mesonBool "render-server" false)
(lib.mesonBool "venus" true)
(lib.mesonEnable "drm" false)
];
meta = {
description = "Virtual 3D GPU library that allows a qemu guest to use the host GPU for accelerated 3D rendering";
mainProgram = "virgl_test_server";
homepage = "https://gitlab.freedesktop.org/slp/virglrenderer";
license = lib.licenses.mit;
platforms = lib.platforms.unix;
maintainers = [ lib.maintainers.quinneden ];
};
});
in
stdenv.mkDerivation (finalAttrs: {
pname = "libkrun-efi";
version = "1.15.1";
src = fetchFromGitHub {
owner = "containers";
repo = "libkrun";
tag = "v${finalAttrs.version}";
hash = "sha256-VhlFyYJ/TH12I3dUq0JTus60rQEJq5H4Pm1puCnJV5A=";
};
outputs = [
"out"
"dev"
];
cargoDeps = rustPlatform.fetchCargoVendor {
inherit (finalAttrs) src;
hash = "sha256-dK3V7HCCvTqmQhB5Op2zmBPa9FO3h9gednU9tpQk+1U=";
};
nativeBuildInputs = [
cargo
fixDarwinDylibNames
pkg-config
rustc
rustPlatform.bindgenHook
rustPlatform.cargoSetupHook
];
buildInputs = [
libepoxy
rutabaga_gfx
virglrenderer
];
makeFlags = [
"PREFIX=${placeholder "out"}"
"EFI=1"
]
++ lib.optional withGpu "GPU=1";
passthru = {
tests.withoutGpu = libkrun-efi.override { withGpu = false; };
updateScript = nix-update-script { };
};
meta = {
description = "EFI variant of Libkrun, a dynamic library providing Virtualization-based process isolation capabilities";
homepage = "https://github.com/containers/libkrun";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ quinneden ];
platforms = [ "aarch64-darwin" ];
};
})