2021-01-15 07:07:56 +00:00
|
|
|
{ lib, stdenv, fetchurl, pkg-config, expat, libmysqlclient,
|
2020-02-21 12:34:38 +00:00
|
|
|
enableXmlpipe2 ? false,
|
2020-02-21 12:33:57 +00:00
|
|
|
enableMysql ? true
|
2014-08-24 11:17:31 +01:00
|
|
|
}:
|
2014-07-06 13:08:39 +01:00
|
|
|
|
2020-02-21 12:33:57 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-13 22:52:01 +01:00
|
|
|
pname = "sphinxsearch";
|
2020-02-21 12:33:57 +00:00
|
|
|
version = "2.2.11";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://sphinxsearch.com/files/sphinx-${version}-release.tar.gz";
|
|
|
|
sha256 = "1aa1mh32y019j8s3sjzn4vwi0xn83dwgl685jnbgh51k16gh6qk6";
|
|
|
|
};
|
2014-07-06 13:08:39 +01:00
|
|
|
|
2020-02-21 12:46:57 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2014-07-06 13:08:39 +01:00
|
|
|
configureFlags = [
|
|
|
|
"--program-prefix=sphinxsearch-"
|
2014-09-04 13:21:28 +01:00
|
|
|
"--enable-id64"
|
2021-01-15 07:07:56 +00:00
|
|
|
] ++ lib.optionals (!enableMysql) [
|
2020-02-21 12:33:57 +00:00
|
|
|
"--without-mysql"
|
2014-07-06 13:08:39 +01:00
|
|
|
];
|
|
|
|
|
2017-09-14 20:24:37 +01:00
|
|
|
nativeBuildInputs = [
|
2020-02-21 12:33:57 +00:00
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
2021-01-15 07:07:56 +00:00
|
|
|
buildInputs = lib.optionals enableMysql [
|
2020-02-21 12:33:57 +00:00
|
|
|
libmysqlclient
|
2021-01-15 07:07:56 +00:00
|
|
|
] ++ lib.optionals enableXmlpipe2 [
|
2020-02-21 12:34:38 +00:00
|
|
|
expat
|
2014-07-06 13:08:39 +01:00
|
|
|
];
|
|
|
|
|
2021-01-15 07:07:56 +00:00
|
|
|
CXXFLAGS = with lib; concatStringsSep " " (optionals stdenv.isDarwin [
|
2020-02-27 15:19:40 +00:00
|
|
|
# see upstream bug: http://sphinxsearch.com/bugs/view.php?id=2578
|
|
|
|
# workaround for "error: invalid suffix on literal
|
|
|
|
"-Wno-reserved-user-defined-literal"
|
|
|
|
# workaround for "error: non-constant-expression cannot be narrowed from type 'long' to 'int'"
|
|
|
|
"-Wno-c++11-narrowing"
|
|
|
|
]);
|
|
|
|
|
2014-07-06 13:08:39 +01:00
|
|
|
meta = {
|
2014-08-24 11:17:31 +01:00
|
|
|
description = "An open source full text search server";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://sphinxsearch.com";
|
2021-01-15 07:07:56 +00:00
|
|
|
license = lib.licenses.gpl2;
|
|
|
|
platforms = lib.platforms.all;
|
|
|
|
maintainers = with lib.maintainers; [ ederoyd46 valodim ];
|
2014-07-06 13:08:39 +01:00
|
|
|
};
|
|
|
|
}
|