2022-10-21 18:38:19 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, postgresql }:
|
2022-06-16 17:23:12 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "wal2json";
|
2022-10-21 18:38:19 +00:00
|
|
|
version = "2.5";
|
2022-06-16 17:23:12 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "eulerto";
|
|
|
|
repo = "wal2json";
|
|
|
|
rev = "wal2json_${builtins.replaceStrings ["."] ["_"] version}";
|
2022-10-21 18:38:19 +00:00
|
|
|
sha256 = "sha256-Gpc9uDKrs/dmVSFgdgHM453+TaEnhRh9t0gDbSn8FUI=";
|
2022-06-16 17:23:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ postgresql ];
|
|
|
|
|
|
|
|
makeFlags = [ "USE_PGXS=1" ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
install -D -t $out/lib *.so
|
|
|
|
install -D -t $out/share/postgresql/extension sql/*.sql
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "PostgreSQL JSON output plugin for changeset extraction";
|
|
|
|
homepage = "https://github.com/eulerto/wal2json";
|
|
|
|
changelog = "https://github.com/eulerto/wal2json/releases/tag/wal2json_${version}";
|
|
|
|
maintainers = with maintainers; [ euank ];
|
|
|
|
platforms = postgresql.meta.platforms;
|
|
|
|
license = licenses.bsd3;
|
|
|
|
};
|
|
|
|
}
|