Merge pull request #276571 from marsam/update-pg_repack
postgresqlPackages.pg_repack: 1.4.8 -> 1.5.0
This commit is contained in:
commit
57bae60522
1 changed files with 40 additions and 9 deletions
|
@ -1,24 +1,54 @@
|
||||||
{ lib, stdenv, fetchFromGitHub, postgresql, openssl, zlib, readline }:
|
{ lib
|
||||||
|
, stdenv
|
||||||
|
, fetchFromGitHub
|
||||||
|
, openssl
|
||||||
|
, postgresql
|
||||||
|
, postgresqlTestHook
|
||||||
|
, readline
|
||||||
|
, testers
|
||||||
|
, zlib
|
||||||
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
pname = "pg_repack";
|
pname = "pg_repack";
|
||||||
version = "1.4.8";
|
version = "1.5.0";
|
||||||
|
|
||||||
buildInputs = [ postgresql openssl zlib readline ];
|
buildInputs = [ postgresql openssl zlib readline ];
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "reorg";
|
owner = "reorg";
|
||||||
repo = "pg_repack";
|
repo = "pg_repack";
|
||||||
rev = "ver_${version}";
|
rev = "ver_${finalAttrs.version}";
|
||||||
sha256 = "sha256-Et8aMRzG7ez0uy9wG6qsg57/kPPZdUhb+/gFxW86D08=";
|
sha256 = "sha256-do80phyMxwcRIkYyUt9z02z7byNQhK+pbSaCUmzG+4c=";
|
||||||
};
|
};
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
install -D bin/pg_repack -t $out/bin/
|
install -D bin/pg_repack -t $out/bin/
|
||||||
install -D lib/pg_repack${postgresql.dlSuffix} -t $out/lib/
|
install -D lib/pg_repack${postgresql.dlSuffix} -t $out/lib/
|
||||||
install -D lib/{pg_repack--${version}.sql,pg_repack.control} -t $out/share/postgresql/extension
|
install -D lib/{pg_repack--${finalAttrs.version}.sql,pg_repack.control} -t $out/share/postgresql/extension
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
passthru.tests = {
|
||||||
|
version = testers.testVersion {
|
||||||
|
package = finalAttrs.finalPackage;
|
||||||
|
};
|
||||||
|
extension = stdenv.mkDerivation {
|
||||||
|
name = "plpgsql-check-test";
|
||||||
|
dontUnpack = true;
|
||||||
|
doCheck = true;
|
||||||
|
buildInputs = [ postgresqlTestHook ];
|
||||||
|
nativeCheckInputs = [ (postgresql.withPackages (ps: [ ps.pg_repack ])) ];
|
||||||
|
postgresqlTestUserOptions = "LOGIN SUPERUSER";
|
||||||
|
failureHook = "postgresqlStop";
|
||||||
|
checkPhase = ''
|
||||||
|
runHook preCheck
|
||||||
|
psql -a -v ON_ERROR_STOP=1 -c "CREATE EXTENSION pg_repack;"
|
||||||
|
runHook postCheck
|
||||||
|
'';
|
||||||
|
installPhase = "touch $out";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Reorganize tables in PostgreSQL databases with minimal locks";
|
description = "Reorganize tables in PostgreSQL databases with minimal locks";
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
|
@ -31,5 +61,6 @@ stdenv.mkDerivation rec {
|
||||||
license = licenses.bsd3;
|
license = licenses.bsd3;
|
||||||
maintainers = with maintainers; [ danbst ];
|
maintainers = with maintainers; [ danbst ];
|
||||||
inherit (postgresql.meta) platforms;
|
inherit (postgresql.meta) platforms;
|
||||||
|
mainProgram = "pg_repack";
|
||||||
};
|
};
|
||||||
}
|
})
|
||||||
|
|
Loading…
Reference in a new issue