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 12:41:18 +00: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 18:40:05 +00: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 ];
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
2014-11-17 00:22:27 +00:00
|
|
|
postPatch = ''
|
2021-11-12 17:22:05 +00:00
|
|
|
substituteInPlace src/test/CMakeLists.txt \
|
|
|
|
--replace "add_subdirectory(gtest)" ""
|
2014-11-17 00:22:27 +00:00
|
|
|
'';
|
|
|
|
|
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/
|
|
|
|
'';
|
2014-11-17 00:22:27 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "C++ port of the popular Java Lucene search engine";
|
2020-04-01 01:11:51 +00: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
|
|
|
};
|
|
|
|
}
|