2019-05-14 17:32:34 +01:00
|
|
|
{ stdenv, fetchFromGitHub, postgresql }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "pg_partman";
|
2020-05-23 06:33:24 +01:00
|
|
|
version = "4.4.0";
|
2019-05-14 17:32:34 +01:00
|
|
|
|
|
|
|
buildInputs = [ postgresql ];
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pgpartman";
|
|
|
|
repo = pname;
|
|
|
|
rev = "refs/tags/v${version}";
|
2020-05-23 06:33:24 +01:00
|
|
|
sha256 = "0wr2nivp0b8vk355rnv4bygiashq98q9zhfgdbxzhm7bgxd01rk2";
|
2019-05-14 17:32:34 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
installPhase = ''
|
2019-08-14 23:36:59 +01:00
|
|
|
mkdir -p $out/{lib,share/postgresql/extension}
|
2019-05-14 17:32:34 +01:00
|
|
|
|
|
|
|
cp src/*.so $out/lib
|
2019-07-01 15:18:03 +01:00
|
|
|
cp updates/* $out/share/postgresql/extension
|
|
|
|
cp -r sql/* $out/share/postgresql/extension
|
|
|
|
cp *.control $out/share/postgresql/extension
|
2019-05-14 17:32:34 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Partition management extension for PostgreSQL";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/pgpartman/pg_partman";
|
2019-05-14 17:32:34 +01:00
|
|
|
maintainers = with maintainers; [ ggpeti ];
|
|
|
|
platforms = postgresql.meta.platforms;
|
|
|
|
license = licenses.postgresql;
|
|
|
|
};
|
|
|
|
}
|