nixpkgs/pkgs/tools/misc/promql-cli/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

33 lines
743 B
Nix
Raw Normal View History

2022-09-13 09:22:26 +00:00
{ lib
, buildGoModule
, fetchFromGitHub
}:
buildGoModule rec {
pname = "promql-cli";
2023-01-12 00:36:14 +00:00
version = "0.3.0";
2022-09-13 09:22:26 +00:00
src = fetchFromGitHub {
owner = "nalbury";
repo = pname;
rev = "v${version}";
2023-01-12 00:36:14 +00:00
hash = "sha256-EV63fdG+GF+kVLH2TxHPhRcUU5xBvkW5bhHC1lEoj84=";
2022-09-13 09:22:26 +00:00
};
2023-01-12 00:36:14 +00:00
vendorHash = "sha256-jhNll04xGaxS6NJTh4spSW9zPrff8jk5OEQiRevPQwU=";
2022-09-13 09:22:26 +00:00
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 ];
2023-11-27 01:17:53 +00:00
mainProgram = "promql";
2022-09-13 09:22:26 +00:00
};
}