2023-07-31 21:27:29 +00:00
|
|
|
{ lib
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, stdenv
|
2023-09-04 11:00:17 +00:00
|
|
|
, nix-update-script
|
2023-07-31 21:27:29 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "kraftkit";
|
2023-09-04 11:00:17 +00:00
|
|
|
version = "0.6.6";
|
2023-07-31 21:27:29 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "unikraft";
|
|
|
|
repo = "kraftkit";
|
|
|
|
rev = "v${version}";
|
2023-09-04 11:00:17 +00:00
|
|
|
hash = "sha256-3dI3F1cCeLEOd+zusWUDZWLrVaaKHXzwOL/mF/yPZC8=";
|
2023-07-31 21:27:29 +00:00
|
|
|
};
|
|
|
|
|
2023-09-04 11:00:17 +00:00
|
|
|
vendorHash = "sha256-4zciooCUNVLTQ/0tctqV3hExR5vRY5VumHzGtL8xdws=";
|
2023-07-31 21:27:29 +00:00
|
|
|
|
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
"-X kraftkit.sh/internal/version.version=${version}"
|
|
|
|
];
|
|
|
|
|
|
|
|
subPackages = [ "cmd/kraft" ];
|
|
|
|
|
2023-09-04 11:00:17 +00:00
|
|
|
passthru = {
|
|
|
|
updateScript = nix-update-script {
|
|
|
|
extraArgs = [ "--version-regex" "^v([0-9.]+)" ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2023-07-31 21:27:29 +00:00
|
|
|
meta = {
|
|
|
|
description = "Build and use highly customized and ultra-lightweight unikernel VMs";
|
|
|
|
homepage = "https://github.com/unikraft/kraftkit";
|
|
|
|
license = lib.licenses.bsd3;
|
|
|
|
maintainers = with lib.maintainers; [ dit7ya ];
|
|
|
|
mainProgram = "kraft";
|
|
|
|
broken = stdenv.isDarwin; # > machine/platform/iterator_v1alpha1.go:32:34: undefined: hostSupportedStrategies
|
|
|
|
};
|
|
|
|
}
|