Merge pull request #319256 from shivaraj-bh/system_stats

This commit is contained in:
Sandro 2024-06-20 12:11:16 +02:00 committed by GitHub
commit e5aa50d733
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 42 additions and 0 deletions

View File

@ -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 { };

View File

@ -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;
};
}