2023-07-31 21:27:29 +00:00
|
|
|
{ lib
|
2024-11-25 19:43:26 +00:00
|
|
|
, stdenv
|
2023-07-31 21:27:29 +00:00
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
2024-11-25 19:43:26 +00:00
|
|
|
, pkg-config
|
|
|
|
, btrfs-progs
|
|
|
|
, gpgme
|
2023-09-04 11:00:17 +00:00
|
|
|
, nix-update-script
|
2023-07-31 21:27:29 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "kraftkit";
|
2024-11-25 19:43:26 +00:00
|
|
|
version = "0.9.4";
|
2023-07-31 21:27:29 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "unikraft";
|
|
|
|
repo = "kraftkit";
|
|
|
|
rev = "v${version}";
|
2024-11-25 19:43:26 +00:00
|
|
|
hash = "sha256-4+3yMx/Vf4aZKC5GRhnAeH4oaJ0Rbz8oXptMtPV+5tA=";
|
2023-07-31 21:27:29 +00:00
|
|
|
};
|
|
|
|
|
2024-11-25 19:43:26 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
gpgme
|
|
|
|
] ++ lib.optionals stdenv.hostPlatform.isLinux [
|
|
|
|
btrfs-progs
|
|
|
|
];
|
|
|
|
|
|
|
|
vendorHash = "sha256-uyoIlNhgL684f+3+I4CFc+iuMRdI5WAUr7dWr0Bt6bA=";
|
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;
|
2024-11-25 19:43:26 +00:00
|
|
|
maintainers = with lib.maintainers; [ dit7ya cloudripper ];
|
2023-07-31 21:27:29 +00:00
|
|
|
mainProgram = "kraft";
|
|
|
|
};
|
|
|
|
}
|