Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
48 lines
1.0 KiB
Nix
48 lines
1.0 KiB
Nix
{
|
|
lib,
|
|
buildGoModule,
|
|
fetchFromGitHub,
|
|
versionCheckHook,
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "natscli";
|
|
version = "0.2.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "nats-io";
|
|
repo = "natscli";
|
|
tag = "v${version}";
|
|
hash = "sha256-5iGU23HsaMuRDcy3qeCJZE3p2ikaIlLnuWyGfCAlMYQ=";
|
|
};
|
|
|
|
vendorHash = "sha256-8JtMcEI3UMMuTa9jmkTspjKtseIb2XUcbNuWlrkAVfg=";
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
"-X=main.version=${version}"
|
|
];
|
|
|
|
nativeInstallCheckInputs = [ versionCheckHook ];
|
|
|
|
preCheck = ''
|
|
# Remove tests that depend on CLI output
|
|
substituteInPlace internal/asciigraph/asciigraph_test.go \
|
|
--replace-fail "TestPlot" "SkipPlot"
|
|
'';
|
|
|
|
doInstallCheck = true;
|
|
|
|
versionCheckProgram = "${placeholder "out"}/bin/nats";
|
|
|
|
meta = {
|
|
description = "NATS Command Line Interface";
|
|
homepage = "https://github.com/nats-io/natscli";
|
|
changelog = "https://github.com/nats-io/natscli/releases/tag/v${version}";
|
|
license = lib.licenses.asl20;
|
|
maintainers = with lib.maintainers; [ fab ];
|
|
mainProgram = "nats";
|
|
};
|
|
}
|