nixpkgs/pkgs/development/tools/extism-cli/default.nix

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

44 lines
1.0 KiB
Nix
Raw Normal View History

2023-12-31 16:32:17 +00:00
{
lib
, buildGoModule
, fetchFromGitHub
, installShellFiles
}:
buildGoModule rec {
2022-12-19 01:50:22 +00:00
pname = "extism-cli";
2024-04-25 01:17:35 +00:00
version = "1.3.0";
2022-12-19 01:50:22 +00:00
src = fetchFromGitHub {
owner = "extism";
repo = "cli";
2023-12-31 16:32:17 +00:00
rev = "refs/tags/v${version}";
2024-04-25 01:17:35 +00:00
hash = "sha256-wHEbTK7bYFOI+I7vQqgku4nkpD87zD7SoU/wpmHqets=";
2022-12-19 01:50:22 +00:00
};
2023-12-31 16:32:17 +00:00
modRoot = "./extism";
2022-12-19 01:50:22 +00:00
2024-04-25 01:17:35 +00:00
vendorHash = "sha256-js8A0AQPpcj1nBNUiSFJ0OlrqDD7AbV/UNHvxBfHG6c=";
2022-12-19 01:50:22 +00:00
2023-12-31 16:32:17 +00:00
nativeBuildInputs = [ installShellFiles ];
2022-12-19 01:50:22 +00:00
2023-12-31 16:32:17 +00:00
doCheck = false; # Tests require network access
2022-12-19 01:50:22 +00:00
2023-12-31 16:32:17 +00:00
postInstall = ''
local INSTALL="$out/bin/extism"
installShellCompletion --cmd extism \
--bash <($out/bin/containerlab completion bash) \
--fish <($out/bin/containerlab completion fish) \
--zsh <($out/bin/containerlab completion zsh)
2022-12-19 01:50:22 +00:00
'';
meta = with lib; {
description = "The extism CLI is used to manage Extism installations";
homepage = "https://github.com/extism/cli";
license = licenses.bsd3;
2023-12-31 16:32:17 +00:00
maintainers = with maintainers; [ zshipko ];
mainProgram = "extism";
2022-12-19 01:50:22 +00:00
platforms = platforms.all;
};
}