Fabian Affolter
2025-04-02 09:24:02 +02:00
parent 3ef9c44a6f
commit d183f42219

View File

@@ -7,30 +7,40 @@
buildGoModule rec {
pname = "natscli";
version = "0.1.6";
version = "0.2.0";
src = fetchFromGitHub {
owner = "nats-io";
repo = "natscli";
tag = "v${version}";
hash = "sha256-kdoBHTJq/Sj27BOD4NFDVpMlywG5H7vGRS6uUbPscOY=";
hash = "sha256-Ya3nNgPa9MEiDDwoBv8oXi7+Hji9fhUNIm55jJ6w++8=";
};
vendorHash = "sha256-RM0PskgKT+n2EQkoIwIbCAwh03TLdcwj7g8AjXBeZPY=";
vendorHash = "sha256-NLsIX0B2YKGNWeAuKIQUs/2sXokUr6PYO5qvvfbbN1Y=";
ldflags = [
"-X main.version=${version}"
"-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 = with lib; {
description = "NATS Command Line Interface";
homepage = "https://github.com/nats-io/natscli";
changelog = "https://github.com/nats-io/natscli/releases/tag/v${version}";
license = with licenses; [ asl20 ];
license = licenses.asl20;
maintainers = with maintainers; [ fab ];
mainProgram = "nats";
};