depot/third_party/nixpkgs/pkgs/development/python-modules/xapian/default.nix
Default email c6ca5b8f13 Project import generated by Copybara.
GitOrigin-RevId: e4d49de45a3b5dbcb881656b4e3986e666141ea9
2022-07-18 18:21:45 +02:00

42 lines
960 B
Nix

{ 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";
hash = "sha256-eGzCjQVmCyJ5VEE68OL2bk6tKgbT322rrqSERUtgHvU=";
};
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/";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ jonringer ];
};
}