Files
nixpkgs/pkgs/by-name/ka/kata-runtime/kata-images.nix
Dark Steveneq 646b892680
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
push sheeet
2025-10-09 14:15:47 +02:00

50 lines
1.5 KiB
Nix

# Derived from https://github.com/colemickens/nixpkgs-kubernetes
{
fetchzip,
lib,
stdenv,
version,
}:
let
imageSuffix =
{
"x86_64-linux" = "amd64";
"aarch64-linux" = "arm64";
}
."${stdenv.hostPlatform.system}" or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
imageHash =
{
"x86_64-linux" = "sha256-7xDc5Rr3rP36zS3kpM2QEqOCtmka3EAnts4Z1h8MNWY=";
"aarch64-linux" = "sha256-8nLHTPetEfIrdtrpiT9Czcpf0NhL97TZ2DXyeBL04LA=";
}
."${stdenv.hostPlatform.system}" or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
in
fetchzip {
name = "kata-images-${version}";
url = "https://github.com/kata-containers/kata-containers/releases/download/${version}/kata-static-${version}-${imageSuffix}.tar.xz";
hash = imageHash;
postFetch = ''
mv $out/kata/share/kata-containers kata-containers
rm -r $out
mkdir -p $out/share
mv kata-containers $out/share/kata-containers
'';
meta = {
description = "Lightweight Virtual Machines like containers that provide the workload isolation and security of VMs";
homepage = "https://github.com/kata-containers/kata-containers";
changelog = "https://github.com/kata-containers/kata-containers/releases/tag/${version}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ thomasjm ];
platforms = [
"x86_64-linux"
"aarch64-linux"
];
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
};
}