summaryrefslogtreecommitdiffstats
path: root/pkgs/by-name/pg/pg_top/package.nix
blob: c10b7be8e8e28ff7fb82112efbcefe8e7c9b1026 (plain)
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
{
  cmake,
  docutils,
  fetchurl,
  lib,
  libbsd,
  ncurses,
  libpq,
  stdenv,
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "pg_top";
  version = "4.1.3";

  src = fetchurl {
    url = "https://pg_top.gitlab.io/source/pg_top-${finalAttrs.version}.tar.xz";
    sha256 = "sha256-4El3GmfP5UDJOsDxyU5z/s3JKw0jlMb8EB/hvtywwVs=";
  };

  buildInputs = [
    libbsd
    libpq
    ncurses
  ];

  nativeBuildInputs = [
    cmake
    docutils
  ];

  meta = {
    description = "'top' like tool for PostgreSQL";
    longDescription = ''
      pg_top allows you to:
       * View currently running SQL statement of a process.
       * View query plan of a currently running SELECT statement.
       * View locks held by a process.
       * View I/O statistics per process.
       * View replication statistics for downstream nodes.
    '';

    homepage = "https://pg_top.gitlab.io";
    changelog = "https://gitlab.com/pg_top/pg_top/-/blob/main/HISTORY.rst";
    platforms = lib.platforms.linux;
    license = lib.licenses.bsd3;
    mainProgram = "pg_top";
  };
})