From bb58f7f46c966747bdec7a7b581c2cec2cc5b7c7 Mon Sep 17 00:00:00 2001 From: Quinn Edenfield Date: Sat, 14 Jun 2025 21:02:55 -0700 Subject: [PATCH 1/3] maintainers: add quinneden --- maintainers/maintainer-list.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index c45018a4b839..ad3fe96e89af 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -20581,6 +20581,12 @@ githubId = 39039420; name = "Quinn Dougherty"; }; + quinneden = { + email = "quinn@qeden.dev"; + github = "quinneden"; + githubId = 125415641; + name = "Quinn Edenfield"; + }; QuiNzX = { name = "QuiNz-"; github = "QuiNzX"; From a8464be051fe50849eceb315ddb83794b957927b Mon Sep 17 00:00:00 2001 From: Quinn Edenfield Date: Mon, 1 Sep 2025 19:33:13 -0700 Subject: [PATCH 2/3] libkrun-efi: init at 1.15.1 --- pkgs/by-name/li/libkrun-efi/package.nix | 117 ++++++++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 pkgs/by-name/li/libkrun-efi/package.nix diff --git a/pkgs/by-name/li/libkrun-efi/package.nix b/pkgs/by-name/li/libkrun-efi/package.nix new file mode 100644 index 000000000000..e140e811a2ee --- /dev/null +++ b/pkgs/by-name/li/libkrun-efi/package.nix @@ -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" ]; + }; +}) From 854b1ada11a6ce1b1a8e1ddbd73af3afc6bef288 Mon Sep 17 00:00:00 2001 From: Quinn Edenfield Date: Mon, 1 Sep 2025 19:33:13 -0700 Subject: [PATCH 3/3] krunkit: init at 1.0.0 --- pkgs/by-name/kr/krunkit/package.nix | 58 +++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 pkgs/by-name/kr/krunkit/package.nix diff --git a/pkgs/by-name/kr/krunkit/package.nix b/pkgs/by-name/kr/krunkit/package.nix new file mode 100644 index 000000000000..230317284893 --- /dev/null +++ b/pkgs/by-name/kr/krunkit/package.nix @@ -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 ]; + }; +})