about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/misc/promql-cli/default.nix
blob: a65dfb87ea0a8c2b4e1d89cbe065248ef447efc0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{ 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 ];
  };
}