nixpkgs/pkgs/servers/sql/postgresql/ext/pg_partman.nix

33 lines
892 B
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, postgresql }:
2019-05-14 16:32:34 +00:00
stdenv.mkDerivation rec {
pname = "pg_partman";
version = "4.4.1";
2019-05-14 16:32:34 +00:00
buildInputs = [ postgresql ];
src = fetchFromGitHub {
owner = "pgpartman";
repo = pname;
rev = "refs/tags/v${version}";
sha256 = "sha256-jFG2Zna97FHZin2V3Cwy5JcdeFh09Yy/eoyHtcCorPA=";
2019-05-14 16:32:34 +00:00
};
installPhase = ''
mkdir -p $out/{lib,share/postgresql/extension}
2019-05-14 16:32:34 +00:00
cp src/*.so $out/lib
cp updates/* $out/share/postgresql/extension
cp -r sql/* $out/share/postgresql/extension
cp *.control $out/share/postgresql/extension
2019-05-14 16:32:34 +00:00
'';
meta = with lib; {
2019-05-14 16:32:34 +00:00
description = "Partition management extension for PostgreSQL";
homepage = "https://github.com/pgpartman/pg_partman";
2019-05-14 16:32:34 +00:00
maintainers = with maintainers; [ ggpeti ];
platforms = postgresql.meta.platforms;
license = licenses.postgresql;
};
}