nixpkgs/pkgs/by-name/kr/kraft/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

56 lines
1.1 KiB
Nix
Raw Normal View History

2023-07-31 21:27:29 +00:00
{ lib
, stdenv
2023-07-31 21:27:29 +00:00
, buildGoModule
, fetchFromGitHub
, pkg-config
, btrfs-progs
, gpgme
, nix-update-script
2023-07-31 21:27:29 +00:00
}:
buildGoModule rec {
pname = "kraftkit";
version = "0.9.4";
2023-07-31 21:27:29 +00:00
src = fetchFromGitHub {
owner = "unikraft";
repo = "kraftkit";
rev = "v${version}";
hash = "sha256-4+3yMx/Vf4aZKC5GRhnAeH4oaJ0Rbz8oXptMtPV+5tA=";
2023-07-31 21:27:29 +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" ];
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 cloudripper ];
2023-07-31 21:27:29 +00:00
mainProgram = "kraft";
};
}