postgresqlPackages.rum: 1.3.13 -> 1.3.14

Also add a simple smoke test.

Changes: https://github.com/postgrespro/rum/releases/tag/1.3.14
This commit is contained in:
Dee Anzorge 2024-10-13 23:51:01 +02:00
parent ae88a07753
commit ed1c5625be

View File

@ -1,14 +1,20 @@
{ lib, stdenv, fetchFromGitHub, postgresql }:
{
lib,
stdenv,
fetchFromGitHub,
postgresql,
postgresqlTestHook,
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "rum";
version = "1.3.13";
version = "1.3.14";
src = fetchFromGitHub {
owner = "postgrespro";
repo = "rum";
rev = version;
hash = "sha256-yy2xeDnk3fENN+En0st4mv60nZlqPafIzwf68jwJ5fE=";
rev = finalAttrs.version;
hash = "sha256-VsfpxQqRBu9bIAP+TfMRXd+B3hSjuhU2NsutocNiCt8=";
};
buildInputs = [ postgresql ];
@ -21,6 +27,34 @@ stdenv.mkDerivation rec {
install -D -t $out/share/postgresql/extension *.sql
'';
passthru.tests.extension = stdenv.mkDerivation {
inherit (finalAttrs) version;
pname = "rum-test";
dontUnpack = true;
doCheck = true;
nativeCheckInputs = [
postgresqlTestHook
(postgresql.withPackages (_: [ finalAttrs.finalPackage ]))
];
failureHook = "postgresqlStop";
postgresqlTestUserOptions = "LOGIN SUPERUSER";
passAsFile = [ "sql" ];
sql = ''
CREATE EXTENSION rum;
CREATE TABLE test_table (t text, v tsvector);
CREATE INDEX test_table_rumindex ON test_table USING rum (v rum_tsvector_ops);
'';
checkPhase = ''
runHook preCheck
psql -a -v ON_ERROR_STOP=1 -f $sqlPath
runHook postCheck
'';
installPhase = "touch $out";
};
meta = with lib; {
description = "Full text search index method for PostgreSQL";
homepage = "https://github.com/postgrespro/rum";
@ -28,4 +62,4 @@ stdenv.mkDerivation rec {
platforms = postgresql.meta.platforms;
maintainers = with maintainers; [ DeeUnderscore ];
};
}
})