Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / xapian / default.nix
blob2daf40454974bb782c35148c088f419f10d3f42c
1 { lib, buildPythonPackage, fetchurl, python
2 , sphinx
3 , xapian
4 }:
6 let
7   pythonSuffix = lib.optionalString python.isPy3k "3";
8 in
9 buildPythonPackage rec {
10   pname = "xapian";
11   inherit (xapian) version;
12   format = "other";
14   src = fetchurl {
15     url = "https://oligarchy.co.uk/xapian/${version}/xapian-bindings-${version}.tar.xz";
16     hash = "sha256-UT1XhIgnkZis4TrUl1ENKyIgTV15S2QUPQW3vpdOts8=";
17   };
19   configureFlags = [
20     "--with-python${pythonSuffix}"
21     "PYTHON${pythonSuffix}_LIB=${placeholder "out"}/${python.sitePackages}"
22   ];
24   preConfigure = ''
25     export XAPIAN_CONFIG=${xapian}/bin/xapian-config
26   '';
28   buildInputs = [ sphinx xapian ];
30   doCheck = true;
32   checkPhase = ''
33     ${python.interpreter} python${pythonSuffix}/pythontest.py
34   '';
36   meta = with lib; {
37     description = "Python Bindings for Xapian";
38     homepage = "https://xapian.org/";
39     changelog = "https://xapian.org/docs/xapian-bindings-${version}/NEWS";
40     license = licenses.gpl2Plus;
41     maintainers = with maintainers; [ jonringer ];
42   };