Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

packages/microsoft.tardev-snapshotter: init at 3.2.0.azl1 #681

Merged
merged 2 commits into from
Jul 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
14 changes: 2 additions & 12 deletions packages/by-name/microsoft/kata-image/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
microsoft,
bubblewrap,
fakeroot,
fetchFromGitHub,
fetchurl,
yq-go,
tdnf,
Expand All @@ -26,13 +25,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 +34,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 +114,8 @@ let
in

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

outputs = [
"out"
Expand Down
31 changes: 31 additions & 0 deletions packages/by-name/microsoft/tardev-snapshotter/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Copyright 2024 Edgeless Systems GmbH
# SPDX-License-Identifier: AGPL-3.0-only

{
lib,
rustPlatform,
microsoft,
cmake,
protobuf,
}:

rustPlatform.buildRustPackage rec {
pname = "tardev-snapshotter";
inherit (microsoft.kata-runtime) version src;

sourceRoot = "${src.name}/src/tardev-snapshotter";

cargoHash = "sha256-0Jj0+Dsm2wykNopy1Oga0wSQEGIl66AppwmWfjm14mg=";

nativeBuildInputs = [
cmake
protobuf
msanft marked this conversation as resolved.
Show resolved Hide resolved
];

env.RUSTC_BOOTSTRAP = 1;

meta = {
license = lib.licenses.asl20;
mainProgram = "tardev-snapshotter";
};
}