2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, postgresql }:
|
2019-05-14 17:32:34 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "pg_partman";
|
2021-05-31 00:29:06 +01:00
|
|
|
version = "4.5.1";
|
2019-05-14 17:32:34 +01:00
|
|
|
|
|
|
|
buildInputs = [ postgresql ];
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pgpartman";
|
|
|
|
repo = pname;
|
|
|
|
rev = "refs/tags/v${version}";
|
2021-05-31 00:29:06 +01:00
|
|
|
sha256 = "182yqvgcpgw99swn7w516f6d1bid2gnmf6dfsgmldx5viz0d6vi0";
|
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
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-05-14 17:32:34 +01:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|