Luke Granger-Brown
57725ef3ec
git-subtree-dir: third_party/nixpkgs git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
40 lines
1 KiB
Nix
40 lines
1 KiB
Nix
{
|
|
fetchFromGitHub,
|
|
lib,
|
|
stdenv,
|
|
postgresql,
|
|
}:
|
|
stdenv.mkDerivation rec {
|
|
pname = "system_stats";
|
|
version = "3.2";
|
|
|
|
buildInputs = [ postgresql ];
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "EnterpriseDB";
|
|
repo = "system_stats";
|
|
rev = "v${version}";
|
|
hash = "sha256-/xXnui0S0ZjRw7P8kMAgttHVv8T41aOhM3pM8P0OTig=";
|
|
};
|
|
|
|
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;
|
|
};
|
|
}
|