Skip to content

Commit

Permalink
microsoft.kata-{agent,image}: inherit src/version from kata-runtime
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Meyer <[email protected]>
  • Loading branch information
katexochen committed Jul 5, 2024
1 parent 851c398 commit 5c196b0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 20 deletions.
11 changes: 2 additions & 9 deletions packages/by-name/microsoft/kata-agent/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
lib,
rustPlatform,
fetchFromGitHub,
microsoft,
cmake,
pkg-config,
protobuf,
Expand All @@ -18,14 +18,7 @@

rustPlatform.buildRustPackage rec {
pname = "kata-agent";
version = "3.2.0.azl1";

src = fetchFromGitHub {
owner = "microsoft";
repo = "kata-containers";
rev = version;
hash = "sha256-W36RJFf0MVRIBV4ahpv6pqdAwgRYrlqmu4Y/8qiILS8=";
};
inherit (microsoft.kata-runtime) version src;

sourceRoot = "${src.name}/src/agent";

Expand Down
13 changes: 2 additions & 11 deletions packages/by-name/microsoft/kata-image/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,6 @@
}:

let
kata-version = "3.2.0.azl1";
src = fetchFromGitHub {
owner = "microsoft";
repo = "kata-containers";
rev = kata-version;
hash = "sha256-W36RJFf0MVRIBV4ahpv6pqdAwgRYrlqmu4Y/8qiILS8=";
};
# toplevelNixDeps are packages that get installed to the rootfs of the image
# they are used to determine the (nix) closure of the rootfs
toplevelNixDeps = [ microsoft.kata-agent ];
Expand All @@ -42,9 +35,8 @@ let
)
);
rootfsExtraTree = stdenvNoCC.mkDerivation {
inherit src;
pname = "rootfs-extra-tree";
version = kata-version;
inherit (microsoft.genpolicy) src version;

# https://github.com/microsoft/azurelinux/blob/59ce246f224f282b3e199d9a2dacaa8011b75a06/SPECS/kata-containers-cc/mariner-coco-build-uvm.sh#L34-L41
buildPhase = ''
Expand Down Expand Up @@ -123,9 +115,8 @@ let
in

stdenv.mkDerivation rec {
inherit src;
pname = "kata-image";
version = kata-version;
inherit (microsoft.genpolicy) src version;

outputs = [
"out"
Expand Down

0 comments on commit 5c196b0

Please sign in to comment.