diff options
author | Sandro <sandro.jaeckel@gmail.com> | 2024-06-20 12:11:16 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-20 12:11:16 +0200 |
commit | e5aa50d7333b9a872c7a77937bc69144c6a209f8 (patch) | |
tree | 7430eec74ef39066d30cc40a84c3c80234f2bd46 /pkgs/servers/sql | |
parent | 65b6baea6f4139ac9078fa65e0eef52a3a091747 (diff) | |
parent | da694466aab6da413c1edd3d2f41c8cd921b5e4a (diff) |
Merge pull request #319256 from shivaraj-bh/system_stats
Diffstat (limited to 'pkgs/servers/sql')
-rw-r--r-- | pkgs/servers/sql/postgresql/ext/default.nix | 2 | ||||
-rw-r--r-- | pkgs/servers/sql/postgresql/ext/system_stats.nix | 40 |
2 files changed, 42 insertions, 0 deletions
diff --git a/pkgs/servers/sql/postgresql/ext/default.nix b/pkgs/servers/sql/postgresql/ext/default.nix index 6166bda6b41d..383eee05b3ef 100644 --- a/pkgs/servers/sql/postgresql/ext/default.nix +++ b/pkgs/servers/sql/postgresql/ext/default.nix @@ -74,6 +74,8 @@ self: super: { smlar = super.callPackage ./smlar.nix { }; + system_stats = super.callPackage ./system_stats.nix { }; + temporal_tables = super.callPackage ./temporal_tables.nix { }; timescaledb = super.callPackage ./timescaledb.nix { }; diff --git a/pkgs/servers/sql/postgresql/ext/system_stats.nix b/pkgs/servers/sql/postgresql/ext/system_stats.nix new file mode 100644 index 000000000000..bc2a0973b95f --- /dev/null +++ b/pkgs/servers/sql/postgresql/ext/system_stats.nix @@ -0,0 +1,40 @@ +{ + fetchFromGitHub, + lib, + stdenv, + postgresql, +}: +stdenv.mkDerivation rec { + pname = "system_stats"; + version = "3.0"; + + buildInputs = [ postgresql ]; + + src = fetchFromGitHub { + owner = "EnterpriseDB"; + repo = "system_stats"; + rev = "v${version}"; + hash = "sha256-LuX7/LOi0rl6L/kjbjq7rr2zPcGIOYB7hdZBNJ9xqak="; + }; + + installPhase = '' + runHook preInstall + + mkdir -p $out/{lib,share/postgresql/extension} + + cp *${postgresql.dlSuffix} $out/lib + cp *.sql $out/share/postgresql/extension + cp *.control $out/share/postgresql/extension + + runHook postInstall + ''; + + meta = with lib; { + description = "A Postgres extension for exposing system metrics such as CPU, memory and disk information"; + homepage = "https://github.com/EnterpriseDB/system_stats"; + changelog = "https://github.com/EnterpriseDB/system_stats/raw/v${version}/CHANGELOG.md"; + maintainers = with maintainers; [ shivaraj-bh ]; + platforms = postgresql.meta.platforms; + license = licenses.postgresql; + }; +} |