From 78ea8a72d485a21a9e22f223743bb5b70ebf953e Mon Sep 17 00:00:00 2001 From: Mauricio Scheffer Date: Thu, 19 Aug 2021 21:26:05 +0100 Subject: [PATCH] pg_activity: init at 2.2.0 --- .../tools/database/pg_activity/default.nix | 31 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 33 insertions(+) create mode 100644 pkgs/development/tools/database/pg_activity/default.nix diff --git a/pkgs/development/tools/database/pg_activity/default.nix b/pkgs/development/tools/database/pg_activity/default.nix new file mode 100644 index 000000000000..6754e76a8977 --- /dev/null +++ b/pkgs/development/tools/database/pg_activity/default.nix @@ -0,0 +1,31 @@ +{ python3Packages, fetchFromGitHub, lib }: + +python3Packages.buildPythonApplication rec { + pname = "pg_activity"; + version = "2.2.0"; + disabled = python3Packages.pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = "dalibo"; + repo = pname; + rev = "v${version}"; + sha256 = "145yqjb2rr1k0xz6lclk4fy5zbwcbfkzvn52g9ijjrfl08y15agm"; + }; + + propagatedBuildInputs = with python3Packages; [ + attrs + blessed + humanize + psutil + psycopg2 + ]; + + pythonImportsCheck = [ "pgactivity" ]; + + meta = with lib; { + description = "A top like application for PostgreSQL server activity monitoring"; + homepage = "https://github.com/dalibo/pg_activity"; + license = licenses.postgresql; + maintainers = with maintainers; [ mausch ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 16f912eb548e..7c0b9711882e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8025,6 +8025,8 @@ with pkgs; peco = callPackage ../tools/text/peco { }; + pg_activity = callPackage ../development/tools/database/pg_activity { }; + pg_checksums = callPackage ../development/tools/database/pg_checksums { }; pg_flame = callPackage ../tools/misc/pg_flame { };