pytrainer: unpin python 3.10
[NixPkgs.git] / pkgs / by-name / ka / kata-runtime / kata-images.nix
blobb145c9a340d4973793aff2d4bf04783075fe80d2
1 # Derived from https://github.com/colemickens/nixpkgs-kubernetes
3   fetchzip,
4   lib,
5   stdenv,
6   version,
7 }:
9 let
10   imageSuffix =
11     {
12       "x86_64-linux" = "amd64";
13       "aarch64-linux" = "arm64";
14     }
15     ."${stdenv.hostPlatform.system}" or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
17   imageHash =
18     {
19       "x86_64-linux" = "sha256-6ySKAqrbHDRgVlI7wm2p4Uw96ZMzUpP00liujxlruSM=";
20       "aarch64-linux" = "sha256-pEPkDXT4OunfN2sGb8Ru05tFHaBsYUcmG5Iy7yH4kX8=";
21     }
22     ."${stdenv.hostPlatform.system}" or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
25 fetchzip {
26   name = "kata-images-${version}";
27   url = "https://github.com/kata-containers/kata-containers/releases/download/${version}/kata-static-${version}-${imageSuffix}.tar.xz";
28   hash = imageHash;
30   postFetch = ''
31     mv $out/kata/share/kata-containers kata-containers
32     rm -r $out
33     mkdir -p $out/share
34     mv kata-containers $out/share/kata-containers
35   '';
37   meta = {
38     description = "Lightweight Virtual Machines like containers that provide the workload isolation and security of VMs";
39     homepage = "https://github.com/kata-containers/kata-containers";
40     changelog = "https://github.com/kata-containers/kata-containers/releases/tag/${version}";
41     license = lib.licenses.asl20;
42     maintainers = with lib.maintainers; [ thomasjm ];
43     platforms = [
44       "x86_64-linux"
45       "aarch64-linux"
46     ];
47     sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
48   };