Skip to content

Commit

Permalink
adding vhive and required packages
Browse files Browse the repository at this point in the history
  • Loading branch information
Meandres committed Jun 18, 2024
1 parent 1aa85e5 commit 5539cdf
Show file tree
Hide file tree
Showing 4 changed files with 102 additions and 11 deletions.
4 changes: 2 additions & 2 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ rec {
exmap = pkgs.callPackage ./pkgs/exmap { };
urunc = pkgs.callPackage ./pkgs/urunc {};
bima = pkgs.callPackage ./pkgs/bima {};
# some-qt5-package = pkgs.libsForQt5.callPackage ./pkgs/some-qt5-package { };
# ...
vhive = pkgs.callPackage ./pkgs/vhive { };
firecracker-containerd = pkgs.callPackage ./pkgs/firecracker-containerd { };
}
38 changes: 38 additions & 0 deletions pkgs/firecracker-containerd/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{ lib, fetchFromGitHub, fetchurl, buildGoModule, stdenv }:

buildGoModule rec {
pname = "firecracker-containerd";
version = "0.1";
src = fetchFromGitHub {
owner = "vhive-serverless";
repo = "firecracker-containerd";
rev = "3fae0bdd0f592581a2e0519fd6c307b8549569f8";
hash = "sha256-e3b9e11PBCGXuQtsrO5deNYdiEZIRSPdsex3fn/b4nU=";
};

subPackages = [
"firecracker-control/cmd/containerd"
"agent"
"runtime"
];

postBuild = ''
set -x
CGO_ENABLED=0 buildGoDir install ./agent
set +x
'';

postInstall = ''
mv $out/bin/{runtime,containerd-shim-aws-firecracker}
'';

doCheck = false;
vendorHash = "sha256-IY3YMQMJrxUbKLoY+PJj6JwXd2BtC37vMQPyZlHhpBk=";

meta = with lib; {
homepage = https://vhive-serverless.github.io/;
description = "firecracker-containerd enables containerd to manage containers as Firecracker microVMs";
license = licenses.asl20;
broken = false;
};
}
34 changes: 25 additions & 9 deletions pkgs/urunc/default.nix
Original file line number Diff line number Diff line change
@@ -1,16 +1,32 @@
{ lib, fetchgit, buildGoModule }:
{ lib, fetchgit, fetchurl, buildGoModule, stdenv }:

buildGoModule rec {
#buildGoModule rec {
stdenv.mkDerivation rec {
name = "urunc-${version}";
version = "0.2.0";
src = fetchgit{
url = "https://github.com/nubificus/urunc.git";
rev = "b897d271d43185bdf9164bf570d16cbc1b2110df";
hash = "sha256-ONHOcmQw5+ksqpMh3dcSkemPt32AGdrr3dCAiiYghh4=";
};
srcs = [
(fetchurl {
url = "https://github.com/nubificus/urunc/releases/download/v0.2.0/urunc_amd64";
hash = "sha256-Bo34E7alpKREOAVRtmYdHbDB7PysYgTa0SejBSOIJ+c=";
})
(fetchurl {
url = "https://github.com/nubificus/urunc/releases/download/v0.2.0/containerd-shim-urunc-v2_amd64";
hash = "sha256-FCmEUQLLGTHYKvkQMf92cSypiAlUn3nPDHQL331XYzs=";
})];
#src = fetchgit{
# url = "https://github.com/nubificus/urunc.git";
# rev = "b897d271d43185bdf9164bf570d16cbc1b2110df";
# hash = "sha256-ONHOcmQw5+ksqpMh3dcSkemPt32AGdrr3dCAiiYghh4=";
#};

#doCheck = false;
#vendorHash = "sha256-yucUMVVmDmeR4k7UQ3RZuYV3Lg9YNT+jdt+k0dIcr9s=";

doCheck = false;
vendorHash = "sha256-yucUMVVmDmeR4k7UQ3RZuYV3Lg9YNT+jdt+k0dIcr9s=";
installPhase = ''
mkdir -p $out
cp urunc_amd64 $out/bin/urunc
cp containerd-shim-urunc-v2_amd64 $out/bin/containerd-shim-urunc-v2
'';

meta = with lib; {
homepage = https://github.com/nubificus/urunc;
Expand Down
37 changes: 37 additions & 0 deletions pkgs/vhive/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{ lib, fetchFromGitHub, fetchurl, buildGoModule, stdenv }:

buildGoModule rec {
pname = "vhive";
version = "v" + "1.7.1";
src = fetchFromGitHub {
owner = "vhive-serverless";
repo = "vHive";
rev = version;
hash = "sha256-8/REu4mSajZ+XUDTBSmt2Dj2xOaglRxoMRLSARqlaCo=";
};

preBuild = ''
export GOWORK=off
'';

excludedPackages = [
"function-images/hello_gpu"
"function-images/tests/save_load_minio/client"
"function-images/tests/save_load_minio/proto_gen"
"function-images/tests/save_load_minio/server"
"power_manager"
"scripts"
];

ldflags = [ "-w" ];
doCheck = false;
vendorHash = "sha256-5HYB45D7zfrjduvMRXw2+N9ErUSY3uhjm0NYgzMNytU=";
#deleteVendor = true;

meta = with lib; {
homepage = https://vhive-serverless.github.io/;
description = "Open-source framework for serverless experimentation ";
license = licenses.mit;
broken = false;
};
}

0 comments on commit 5539cdf

Please sign in to comment.