mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-09-29 23:52:55 +00:00
Merge pull request #80727 from Valodim/sphinxsearch-master
sphinxsearch: Add support for MySQL & xmlpipe2
This commit is contained in:
commit
1a4ab0ed4c
@ -1,31 +1,49 @@
|
|||||||
{ stdenv, fetchurl, pkgconfig,
|
{ stdenv, fetchurl, pkg-config, expat, libmysqlclient,
|
||||||
version ? "2.2.11",
|
enableXmlpipe2 ? false,
|
||||||
mainSrc ? fetchurl {
|
enableMysql ? true
|
||||||
url = "http://sphinxsearch.com/files/sphinx-${version}-release.tar.gz";
|
|
||||||
sha256 = "1aa1mh32y019j8s3sjzn4vwi0xn83dwgl685jnbgh51k16gh6qk6";
|
|
||||||
}
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation rec {
|
||||||
pname = "sphinxsearch";
|
pname = "sphinxsearch";
|
||||||
inherit version;
|
version = "2.2.11";
|
||||||
src = mainSrc;
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = "http://sphinxsearch.com/files/sphinx-${version}-release.tar.gz";
|
||||||
|
sha256 = "1aa1mh32y019j8s3sjzn4vwi0xn83dwgl685jnbgh51k16gh6qk6";
|
||||||
|
};
|
||||||
|
|
||||||
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--program-prefix=sphinxsearch-"
|
"--program-prefix=sphinxsearch-"
|
||||||
"--without-mysql"
|
|
||||||
"--enable-id64"
|
"--enable-id64"
|
||||||
|
] ++ stdenv.lib.optionals (!enableMysql) [
|
||||||
|
"--without-mysql"
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
pkgconfig
|
pkg-config
|
||||||
];
|
];
|
||||||
|
|
||||||
|
buildInputs = stdenv.lib.optionals enableMysql [
|
||||||
|
libmysqlclient
|
||||||
|
] ++ stdenv.lib.optionals enableXmlpipe2 [
|
||||||
|
expat
|
||||||
|
];
|
||||||
|
|
||||||
|
CXXFLAGS = with stdenv.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"
|
||||||
|
]);
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "An open source full text search server";
|
description = "An open source full text search server";
|
||||||
homepage = http://sphinxsearch.com;
|
homepage = http://sphinxsearch.com;
|
||||||
license = stdenv.lib.licenses.gpl2;
|
license = stdenv.lib.licenses.gpl2;
|
||||||
platforms = stdenv.lib.platforms.all;
|
platforms = stdenv.lib.platforms.all;
|
||||||
maintainers = with stdenv.lib.maintainers; [ ederoyd46 ];
|
maintainers = with stdenv.lib.maintainers; [ ederoyd46 valodim ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user