2021-11-12 17:22:05 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake, boost, gtest, zlib }:
|
2014-11-17 00:22:27 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "lucene++";
|
2021-11-12 17:22:05 +00:00
|
|
|
version = "3.0.8";
|
2014-11-17 00:22:27 +00:00
|
|
|
|
2021-06-09 19:40:05 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "luceneplusplus";
|
|
|
|
repo = "LucenePlusPlus";
|
|
|
|
rev = "rel_${version}";
|
2021-11-12 17:22:05 +00:00
|
|
|
sha256 = "12v7r62f7pqh5h210pb74sfx6h70lj4pgfpva8ya2d55fn0qxrr2";
|
2014-11-17 00:22:27 +00:00
|
|
|
};
|
|
|
|
|
2021-11-12 17:22:05 +00:00
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
buildInputs = [ boost gtest zlib ];
|
|
|
|
|
2014-11-17 00:22:27 +00:00
|
|
|
postPatch = ''
|
2022-04-30 11:09:52 +01:00
|
|
|
substituteInPlace src/test/CMakeLists.txt \
|
|
|
|
--replace "add_subdirectory(gtest)" ""
|
2014-11-17 00:22:27 +00:00
|
|
|
'';
|
|
|
|
|
2022-04-30 11:09:52 +01:00
|
|
|
doCheck = true;
|
|
|
|
|
2021-11-12 17:22:05 +00:00
|
|
|
checkPhase = ''
|
|
|
|
runHook preCheck
|
|
|
|
LD_LIBRARY_PATH=$PWD/src/contrib:$PWD/src/core \
|
|
|
|
src/test/lucene++-tester
|
|
|
|
runHook postCheck
|
|
|
|
'';
|
2014-11-17 00:22:27 +00:00
|
|
|
|
2021-11-12 17:22:05 +00:00
|
|
|
postInstall = ''
|
|
|
|
mv $out/include/pkgconfig $out/lib/
|
2022-04-30 11:09:52 +01:00
|
|
|
cp $src/src/contrib/include/*h $out/include/lucene++/
|
2021-11-12 17:22:05 +00:00
|
|
|
'';
|
2014-11-17 00:22:27 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "C++ port of the popular Java Lucene search engine";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/luceneplusplus/LucenePlusPlus";
|
2021-01-21 17:00:13 +00:00
|
|
|
license = with lib.licenses; [ asl20 lgpl3Plus ];
|
|
|
|
platforms = lib.platforms.linux;
|
2014-11-17 00:22:27 +00:00
|
|
|
};
|
|
|
|
}
|