nixpkgs/pkgs/servers/search/sphinxsearch/default.nix

50 lines
1.3 KiB
Nix
Raw Normal View History

2021-01-15 08:07:56 +01:00
{ lib, stdenv, fetchurl, pkg-config, expat, libmysqlclient,
enableXmlpipe2 ? false,
enableMysql ? true
}:
2014-07-06 14:08:39 +02:00
stdenv.mkDerivation rec {
2019-08-13 23:52:01 +02:00
pname = "sphinxsearch";
version = "2.2.11";
src = fetchurl {
url = "http://sphinxsearch.com/files/sphinx-${version}-release.tar.gz";
sha256 = "1aa1mh32y019j8s3sjzn4vwi0xn83dwgl685jnbgh51k16gh6qk6";
};
2014-07-06 14:08:39 +02:00
2020-02-21 13:46:57 +01:00
enableParallelBuilding = true;
2014-07-06 14:08:39 +02:00
configureFlags = [
"--program-prefix=sphinxsearch-"
"--enable-id64"
2021-01-15 08:07:56 +01:00
] ++ lib.optionals (!enableMysql) [
"--without-mysql"
2014-07-06 14:08:39 +02:00
];
nativeBuildInputs = [
pkg-config
];
2021-01-15 08:07:56 +01:00
buildInputs = lib.optionals enableMysql [
libmysqlclient
2021-01-15 08:07:56 +01:00
] ++ lib.optionals enableXmlpipe2 [
expat
2014-07-06 14:08:39 +02:00
];
2021-01-15 08:07:56 +01:00
CXXFLAGS = with lib; concatStringsSep " " (optionals stdenv.isDarwin [
# 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 14:08:39 +02:00
meta = {
description = "An open source full text search server";
homepage = "http://sphinxsearch.com";
2021-01-15 08:07:56 +01:00
license = lib.licenses.gpl2;
platforms = lib.platforms.all;
maintainers = with lib.maintainers; [ ederoyd46 valodim ];
2014-07-06 14:08:39 +02:00
};
}