Unverified Commit 24a395a9 authored by Fabian Affolter's avatar Fabian Affolter Committed by GitHub
Browse files

natscli: 0.1.6 -> 0.2.0 (#395407)

parents 72b5b114 d183f422
Loading
Loading
Loading
Loading
+15 −5
Original line number Diff line number Diff line
@@ -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";
  };