2020-04-24 23:36:52 +00:00
|
|
|
{ lib, buildPythonPackage, fetchurl, python
|
|
|
|
, sphinx
|
|
|
|
, xapian
|
|
|
|
}:
|
|
|
|
|
|
|
|
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";
|
2023-11-16 04:20:00 +00:00
|
|
|
hash = "sha256-UT1XhIgnkZis4TrUl1ENKyIgTV15S2QUPQW3vpdOts8=";
|
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
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildInputs = [ sphinx xapian ];
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|