diff options
author | Mario Rodas <marsam@users.noreply.github.com> | 2023-11-27 19:55:12 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-27 19:55:12 -0500 |
commit | b4d76b8db7f235d27bad383f0815bcc5b795a2fd (patch) | |
tree | 2e949d5e496929bcd3c9c19e72ad3f064c6415c1 /pkgs/servers/search | |
parent | deb11327f93c585af941e7ce24bf205947973ac7 (diff) | |
parent | 76bfb735286b0fa4d6ada23f919276d73766260f (diff) | |
download | nixlib-b4d76b8db7f235d27bad383f0815bcc5b795a2fd.tar nixlib-b4d76b8db7f235d27bad383f0815bcc5b795a2fd.tar.gz nixlib-b4d76b8db7f235d27bad383f0815bcc5b795a2fd.tar.bz2 nixlib-b4d76b8db7f235d27bad383f0815bcc5b795a2fd.tar.lz nixlib-b4d76b8db7f235d27bad383f0815bcc5b795a2fd.tar.xz nixlib-b4d76b8db7f235d27bad383f0815bcc5b795a2fd.tar.zst nixlib-b4d76b8db7f235d27bad383f0815bcc5b795a2fd.zip |
Merge pull request #270032 from marsam/update-groonga
groonga: 12.0.7 -> 13.0.9
Diffstat (limited to 'pkgs/servers/search')
-rw-r--r-- | pkgs/servers/search/groonga/default.nix | 72 | ||||
-rw-r--r-- | pkgs/servers/search/groonga/do-not-use-vendored-libraries.patch | 15 | ||||
-rw-r--r-- | pkgs/servers/search/groonga/fix-cmake-install-path.patch | 21 |
3 files changed, 78 insertions, 30 deletions
diff --git a/pkgs/servers/search/groonga/default.nix b/pkgs/servers/search/groonga/default.nix index fbf9f06cff72..49cc74bafc2a 100644 --- a/pkgs/servers/search/groonga/default.nix +++ b/pkgs/servers/search/groonga/default.nix @@ -1,54 +1,66 @@ -{ lib, stdenv, fetchurl, autoreconfHook, mecab, kytea, libedit, pkg-config, libxcrypt +{ lib, stdenv, cmake, fetchurl, kytea, mecab, pkg-config, rapidjson, testers, xxHash, zstd, postgresqlPackages , suggestSupport ? false, zeromq, libevent, msgpack, openssl , lz4Support ? false, lz4 , zlibSupport ? true, zlib }: -stdenv.mkDerivation rec { - +stdenv.mkDerivation (finalAttrs: { pname = "groonga"; - version = "12.0.7"; + version = "13.0.9"; src = fetchurl { - url = "https://packages.groonga.org/source/groonga/${pname}-${version}.tar.gz"; - sha256 = "sha256-Eaei4Zi0Rg9zu7DInLAcaRo8Fyu2mqBblcYNRaS46c8="; + url = "https://packages.groonga.org/source/groonga/groonga-${finalAttrs.version}.tar.gz"; + hash = "sha256-ZmeOYwrd1Xvwqq565zOtcDv6heOLVVaF04M1jEtjDO8="; }; - preConfigure = '' - # To avoid problems due to libc++abi 11 using `#include <version>`. - rm version - ''; + patches = [ + ./fix-cmake-install-path.patch + ./do-not-use-vendored-libraries.patch + ]; - buildInputs = with lib; - [ mecab kytea libedit openssl libxcrypt ] - ++ optional lz4Support lz4 - ++ optional zlibSupport zlib - ++ optionals suggestSupport [ zeromq libevent msgpack ]; + nativeBuildInputs = [ + cmake + pkg-config + ]; - nativeBuildInputs = [ autoreconfHook pkg-config ]; + buildInputs = [ + rapidjson + xxHash + zstd + mecab + kytea + ] ++ lib.optionals lz4Support [ + lz4 + ] ++ lib.optional zlibSupport [ + zlib + ] ++ lib.optionals suggestSupport [ + zeromq + libevent + msgpack + ]; - configureFlags = with lib; - optional zlibSupport "--with-zlib" - ++ optional lz4Support "--with-lz4"; + env.NIX_CFLAGS_COMPILE = lib.optionalString zlibSupport "-I${zlib.dev}/include"; - env = lib.optionalAttrs stdenv.cc.isClang { - # Prevent warning about using a GNU extension from being promoted to an error. - NIX_CFLAGS_COMPILE = "-Wno-error=gnu-folding-constant"; + passthru.tests = { + inherit (postgresqlPackages) pgroonga; + version = testers.testVersion { + package = finalAttrs.finalPackage; + }; + pkg-config = testers.hasPkgConfigModules { + package = finalAttrs.finalPackage; + moduleNames = [ "groonga" ]; + }; }; - doInstallCheck = true; - installCheckPhase = "$out/bin/groonga --version"; - meta = with lib; { - homepage = "https://groonga.org/"; + homepage = "https://groonga.org/"; description = "An open-source fulltext search engine and column store"; - license = licenses.lgpl21; + license = licenses.lgpl21; maintainers = [ maintainers.ericsagnes ]; - platforms = platforms.unix; + platforms = platforms.all; longDescription = '' Groonga is an open-source fulltext search engine and column store. It lets you write high-performance applications that requires fulltext search. ''; }; - -} +}) diff --git a/pkgs/servers/search/groonga/do-not-use-vendored-libraries.patch b/pkgs/servers/search/groonga/do-not-use-vendored-libraries.patch new file mode 100644 index 000000000000..8729031f14cb --- /dev/null +++ b/pkgs/servers/search/groonga/do-not-use-vendored-libraries.patch @@ -0,0 +1,15 @@ +Do not use vendored libraries + +--- a/vendor/CMakeLists.txt ++++ b/vendor/CMakeLists.txt +@@ -14,10 +14,7 @@ + # License along with this library; if not, write to the Free Software + # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + + add_subdirectory(onigmo) +-add_subdirectory(mruby) +-add_subdirectory(mecab) +-add_subdirectory(message_pack) + if(GRN_WITH_MRUBY) + add_subdirectory(groonga-log) + endif() diff --git a/pkgs/servers/search/groonga/fix-cmake-install-path.patch b/pkgs/servers/search/groonga/fix-cmake-install-path.patch new file mode 100644 index 000000000000..5b00cd42404c --- /dev/null +++ b/pkgs/servers/search/groonga/fix-cmake-install-path.patch @@ -0,0 +1,21 @@ +Fix CMake install path + +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1141,11 +1141,11 @@ + + set(prefix "${CMAKE_INSTALL_PREFIX}") + set(exec_prefix "\${prefix}") +-set(bindir "\${exec_prefix}/${CMAKE_INSTALL_BINDIR}") +-set(sbindir "\${exec_prefix}/${CMAKE_INSTALL_SBINDIR}") +-set(libdir "\${prefix}/${CMAKE_INSTALL_LIBDIR}") +-set(includedir "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}") +-set(datarootdir "\${prefix}/${CMAKE_INSTALL_DATAROOTDIR}") ++set(bindir "${CMAKE_INSTALL_FULL_BINDIR}") ++set(sbindir "${CMAKE_INSTALL_FULL_SBINDIR}") ++set(libdir "${CMAKE_INSTALL_FULL_LIBDIR}") ++set(includedir "${CMAKE_INSTALL_FULL_INCLUDEDIR}") ++set(datarootdir "${CMAKE_INSTALL_FULL_DATAROOTDIR}") + set(datadir "\${datarootdir}") + set(expanded_pluginsdir "${GRN_PLUGINS_DIR}") + set(GRN_EXPANDED_DEFAULT_DOCUMENT_ROOT "${GRN_DEFAULT_DOCUMENT_ROOT}") |