2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchurl,
|
|
|
|
python,
|
|
|
|
sphinx,
|
|
|
|
xapian,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
pythonSuffix = lib.optionalString python.isPy3k "3";
|
|
|
|
in
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "xapian";
|
|
|
|
inherit (xapian) version;
|
|
|
|
format = "other";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://oligarchy.co.uk/xapian/${version}/xapian-bindings-${version}.tar.xz";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-BoMU/KP1RSRwFJLfQy+lTEhf1OOWE8os0nXhNpZOgak=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--with-python${pythonSuffix}"
|
|
|
|
"PYTHON${pythonSuffix}_LIB=${placeholder "out"}/${python.sitePackages}"
|
|
|
|
];
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
export XAPIAN_CONFIG=${xapian}/bin/xapian-config
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
buildInputs = [
|
|
|
|
sphinx
|
|
|
|
xapian
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
${python.interpreter} python${pythonSuffix}/pythontest.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python Bindings for Xapian";
|
|
|
|
homepage = "https://xapian.org/";
|
2022-10-06 18:32:54 +00:00
|
|
|
changelog = "https://xapian.org/docs/xapian-bindings-${version}/NEWS";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
maintainers = with maintainers; [ jonringer ];
|
|
|
|
};
|
|
|
|
}
|