summary refs log tree commit diff
path: root/pkgs/development/libraries/lucene++/default.nix
blob: 79e28cc7bb4a1831c890ba9995fd04932840bce1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{ lib, stdenv, fetchFromGitHub, cmake, boost, gtest }:

stdenv.mkDerivation rec {
  pname = "lucene++";
  version = "3.0.7";

  src = fetchFromGitHub {
    owner = "luceneplusplus";
    repo = "LucenePlusPlus";
    rev = "rel_${version}";
    sha256 = "06b37fly6l27zc6kbm93f6khfsv61w792j8xihfagpcm9cfz2zi1";
  };

  postPatch = ''
    sed -i -e '/Subversion *REQUIRED/d' \
           -e '/include.*CMakeExternal/d' \
           CMakeLists.txt
  '';

  cmakeFlags = [ "-DGTEST_INCLUDE_DIR=${gtest}/include" ];
  nativeBuildInputs = [ cmake ];
  buildInputs = [ boost gtest ];

  doCheck = true;
  checkTarget = "test";

  meta = {
    description = "C++ port of the popular Java Lucene search engine";
    homepage = "https://github.com/luceneplusplus/LucenePlusPlus";
    license = with lib.licenses; [ asl20 lgpl3Plus ];
    platforms = lib.platforms.linux;
  };
}