python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / development / libraries / clucene-core / 2.x.nix
blob861e9179e0948093fe93bd35504f237f3bb54fa9
1 {lib, stdenv, fetchurl, cmake, boost, zlib}:
3 stdenv.mkDerivation rec {
4   pname = "clucene-core";
5   version = "2.3.3.4";
7   src = fetchurl {
8     url = "mirror://sourceforge/clucene/clucene-core-${version}.tar.gz";
9     sha256 = "1arffdwivig88kkx685pldr784njm0249k0rb1f1plwavlrw9zfx";
10   };
12   nativeBuildInputs = [ cmake ];
14   buildInputs = [ boost zlib ];
16   cmakeFlags = [
17     "-DBUILD_CONTRIBS=ON"
18     "-DBUILD_CONTRIBS_LIB=ON"
19     "-DCMAKE_BUILD_WITH_INSTALL_NAME_DIR=ON"
20   ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
21     "-D_CL_HAVE_GCC_ATOMIC_FUNCTIONS=0"
22     "-D_CL_HAVE_NAMESPACES_EXITCODE=0"
23     "-D_CL_HAVE_NAMESPACES_EXITCODE__TRYRUN_OUTPUT="
24     "-D_CL_HAVE_NO_SNPRINTF_BUG_EXITCODE=0"
25     "-D_CL_HAVE_NO_SNPRINTF_BUG_EXITCODE__TRYRUN_OUTPUT="
26     "-D_CL_HAVE_TRY_BLOCKS_EXITCODE=0"
27     "-D_CL_HAVE_TRY_BLOCKS_EXITCODE__TRYRUN_OUTPUT="
28     "-D_CL_HAVE_PTHREAD_MUTEX_RECURSIVE=0"
29     "-DLUCENE_STATIC_CONSTANT_SYNTAX_EXITCODE=0"
30     "-DLUCENE_STATIC_CONSTANT_SYNTAX_EXITCODE__TRYRUN_OUTPUT="
31   ];
33   patches = # From debian
34     [ ./Fix-pkgconfig-file-by-adding-clucene-shared-library.patch
35       ./Fixing_ZLIB_configuration_in_shared_CMakeLists.patch
36       ./Install-contribs-lib.patch
37     ] ++ lib.optionals stdenv.isDarwin [ ./fix-darwin.patch ];
39   # fails with "Unable to find executable:
40   # /build/clucene-core-2.3.3.4/build/bin/cl_test"
41   doCheck = false;
43   NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=c++11-narrowing";
45   meta = with lib; {
46     description = "Core library for full-featured text search engine";
47     longDescription = ''
48       CLucene is a high-performance, scalable, cross platform, full-featured,
49       open-source indexing and searching API. Specifically, CLucene is the guts
50       of a search engine, the hard stuff. You write the easy stuff: the UI and
51       the process of selecting and parsing your data files to pump them into
52       the search engine yourself, and any specialized queries to pull it back
53       for display or further processing.
55       CLucene is a port of the very popular Java Lucene text search engine API.
56     '';
57     homepage = "http://clucene.sourceforge.net";
58     platforms = platforms.unix;
59     license = with licenses; [ asl20 lgpl2 ];
60   };