2021-01-23 12:26:19 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, libxslt, docbook_xsl, postgresql }:
|
2020-01-19 02:21:21 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "pg_checksums";
|
2022-01-19 04:20:00 +00:00
|
|
|
version = "1.1";
|
2020-01-19 02:21:21 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "credativ";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2022-01-19 04:20:00 +00:00
|
|
|
sha256 = "sha256-Ij+4ceQauX3tC97ftk/JS3/WlocPBf7A7PJrylpTLzw=";
|
2020-01-19 02:21:21 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ libxslt.bin ];
|
|
|
|
|
|
|
|
buildInputs = [ postgresql ];
|
|
|
|
|
|
|
|
buildFlags = [ "all" "man" ];
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
substituteInPlace doc/stylesheet-man.xsl \
|
|
|
|
--replace "http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl" "${docbook_xsl}/xml/xsl/docbook/manpages/docbook.xsl"
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2022-01-19 04:20:00 +00:00
|
|
|
install -Dm755 -t $out/bin pg_checksums_ext
|
|
|
|
install -Dm644 -t $out/share/man/man1 doc/man1/pg_checksums_ext.1
|
2020-01-19 02:21:21 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-23 12:26:19 +00:00
|
|
|
meta = with lib; {
|
2020-01-19 02:21:21 +00:00
|
|
|
description = "Activate/deactivate/verify checksums in offline PostgreSQL clusters";
|
|
|
|
homepage = "https://github.com/credativ/pg_checksums";
|
|
|
|
maintainers = [ maintainers.marsam ];
|
2022-04-01 19:34:55 +00:00
|
|
|
mainProgram = "pg_checksums_ext";
|
2020-01-19 02:21:21 +00:00
|
|
|
platforms = postgresql.meta.platforms;
|
|
|
|
license = licenses.postgresql;
|
|
|
|
};
|
|
|
|
}
|