2024-01-02 11:29:13 +00:00
|
|
|
{
|
|
|
|
lib
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, installShellFiles
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
2023-01-11 07:51:40 +00:00
|
|
|
pname = "extism-cli";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "0.3.8";
|
2023-01-11 07:51:40 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "extism";
|
|
|
|
repo = "cli";
|
2024-01-02 11:29:13 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-StMipPMLSQzrhWv0yoKkNiuHMRW7QIhmVZ/M27WDWrM=";
|
2023-01-11 07:51:40 +00:00
|
|
|
};
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
modRoot = "./extism";
|
2023-01-11 07:51:40 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
vendorHash = "sha256-sSKiwYT5EP0FQJbhgv9ZFDwwwvIJ66yMULbj529AZwY=";
|
2023-01-11 07:51:40 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
2023-01-11 07:51:40 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
doCheck = false; # Tests require network access
|
2023-01-11 07:51:40 +00:00
|
|
|
|
2024-01-02 11:29:13 +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)
|
2023-01-11 07:51:40 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "The extism CLI is used to manage Extism installations";
|
|
|
|
homepage = "https://github.com/extism/cli";
|
|
|
|
license = licenses.bsd3;
|
2024-01-02 11:29:13 +00:00
|
|
|
maintainers = with maintainers; [ zshipko ];
|
|
|
|
mainProgram = "extism";
|
2023-01-11 07:51:40 +00:00
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|