about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/lucene++/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/lucene++/default.nix')
-rw-r--r--nixpkgs/pkgs/development/libraries/lucene++/default.nix32
1 files changed, 32 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/lucene++/default.nix b/nixpkgs/pkgs/development/libraries/lucene++/default.nix
new file mode 100644
index 000000000000..2761329ea23c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/lucene++/default.nix
@@ -0,0 +1,32 @@
+{ lib, stdenv, fetchurl, cmake, boost, gtest }:
+
+stdenv.mkDerivation rec {
+  pname = "lucene++";
+  version = "3.0.7";
+
+  src = fetchurl {
+    url = "https://github.com/luceneplusplus/LucenePlusPlus/"
+        + "archive/rel_${version}.tar.gz";
+    sha256 = "032yb35b381ifm7wb8cy2m3yndklnxyi5cgprjh48jqy641z46bc";
+  };
+
+  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;
+  };
+}