mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-09-30 03:39:59 +00:00
postgresqlPackages.pgroonga: 4.0.5 -> 4.0.9
Signed-off-by: Anish Pallati <i@anish.land>
This commit is contained in:
@@ -2,37 +2,82 @@
|
||||
fetchFromGitHub,
|
||||
groonga,
|
||||
lib,
|
||||
meson,
|
||||
msgpack-c,
|
||||
ninja,
|
||||
pkg-config,
|
||||
postgresql,
|
||||
postgresqlBuildExtension,
|
||||
ruby,
|
||||
stdenvNoCC,
|
||||
xxhash,
|
||||
}:
|
||||
|
||||
postgresqlBuildExtension (finalAttrs: {
|
||||
pname = "pgroonga";
|
||||
version = "4.0.5";
|
||||
version = "4.0.9";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "pgroonga";
|
||||
repo = "pgroonga";
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-PwUnjwqnmoWQ9kKZuKsAVzVBRyKvT+aexrm5eeRiRIQ=";
|
||||
hash = "sha256-ADHrHCUrpu5aCAU84QyLkmDDJ6QwICLsL6M8o/OMWxU=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
nativeBuildInputs = [
|
||||
meson
|
||||
ninja
|
||||
pkg-config
|
||||
];
|
||||
buildInputs = [
|
||||
msgpack-c
|
||||
groonga
|
||||
xxhash
|
||||
];
|
||||
|
||||
makeFlags = [
|
||||
"HAVE_XXHASH=1"
|
||||
"HAVE_MSGPACK=1"
|
||||
"MSGPACK_PACKAGE_NAME=msgpack-c"
|
||||
mesonFlags = [
|
||||
(lib.mesonEnable "message_pack" true)
|
||||
# tests need pgroonga installed on a running server, run in passthru.tests.regression
|
||||
(lib.mesonBool "test" false)
|
||||
];
|
||||
|
||||
# postgresqlBuildExtension moves files out of DESTDIR in postInstall
|
||||
mesonInstallFlags = [ "--destdir=${placeholder "out"}" ];
|
||||
|
||||
passthru.tests.regression = stdenvNoCC.mkDerivation {
|
||||
pname = "${finalAttrs.pname}-regression";
|
||||
inherit (finalAttrs) version src;
|
||||
|
||||
nativeBuildInputs = [ ruby ];
|
||||
|
||||
dontConfigure = true;
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
|
||||
patchShebangs test/short-pgappname
|
||||
ruby test/prepare.rb schedule
|
||||
# the expected parallel plan depends on the planner's index size estimate
|
||||
sed -i '/declarative-partitioning\/builtin/d' schedule
|
||||
# fails intermittently
|
||||
sed -i '/function\/wal-apply\/delete$/d' schedule
|
||||
|
||||
${lib.getDev postgresql}/lib/pgxs/src/test/regress/pg_regress \
|
||||
--bindir=${postgresql.withPackages (_: [ finalAttrs.finalPackage ])}/bin \
|
||||
--inputdir=. \
|
||||
--outputdir=. \
|
||||
--temp-instance=./tmp_check \
|
||||
--encoding=UTF8 \
|
||||
--launcher=test/short-pgappname \
|
||||
--load-extension=pgroonga \
|
||||
--schedule=schedule
|
||||
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = "touch $out";
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "PostgreSQL extension to use Groonga as the index";
|
||||
longDescription = ''
|
||||
|
||||
Reference in New Issue
Block a user