depot/third_party/nixpkgs/pkgs/tools/misc/promql-cli/default.nix
Default email 504525a148 Project import generated by Copybara.
GitOrigin-RevId: bd645e8668ec6612439a9ee7e71f7eac4099d4f6
2024-01-02 12:29:13 +01:00

32 lines
743 B
Nix

{ lib
, buildGoModule
, fetchFromGitHub
}:
buildGoModule rec {
pname = "promql-cli";
version = "0.3.0";
src = fetchFromGitHub {
owner = "nalbury";
repo = pname;
rev = "v${version}";
hash = "sha256-EV63fdG+GF+kVLH2TxHPhRcUU5xBvkW5bhHC1lEoj84=";
};
vendorHash = "sha256-jhNll04xGaxS6NJTh4spSW9zPrff8jk5OEQiRevPQwU=";
ldflags = [ "-s" "-w" ];
postInstall = ''
mv -v $out/bin/promql-cli $out/bin/promql
'';
meta = with lib; {
description = "Command-line tool to query a Prometheus server with PromQL and visualize the output";
homepage = "https://github.com/nalbury/promql-cli";
license = licenses.asl20;
maintainers = with maintainers; [ arikgrahl ];
mainProgram = "promql";
};
}