sphinxsearch: add support for mysql sources

This commit is contained in:
Vincent Breitmoser 2020-02-21 13:33:57 +01:00
parent ca58f58a0b
commit f14b3aa8c0

View File

@ -1,24 +1,29 @@
{ stdenv, fetchurl, pkgconfig, { stdenv, fetchurl, pkg-config, libmysqlclient,
version ? "2.2.11", enableMysql ? true
mainSrc ? fetchurl {
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";
};
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
]; ];
meta = { meta = {