about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/misc/pgmetrics/default.nix
blob: 04e106ca552282b00072541163a1d22d6606368c (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
{ stdenv, buildGoModule, fetchFromGitHub, Security }:

buildGoModule rec {
  pname = "pgmetrics";
  version = "1.8.1";

  src = fetchFromGitHub {
    owner  = "rapidloop";
    repo   = pname;
    rev    = "v${version}";
    sha256 = "06w2kqjq2yq9yypg6biywrybnmi4jlnnigd7az72hp7lzf2nhl62";
  };

  modSha256 = "0h375zk0ik06g0b5vmi00b1wn5q2c0r137f7qf6l8k8p886x41h6";

  buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ];

  buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version}" ];

  meta = with stdenv.lib; {
    homepage = "https://pgmetrics.io/";
    description = "Collect and display information and stats from a running PostgreSQL server";
    license = licenses.asl20;
    maintainers = [ maintainers.marsam ];
  };
}