16 generic = version: hash: stdenv.mkDerivation {
19 passthru = { inherit version; };
22 url = "https://oligarchy.co.uk/xapian/${version}/xapian-core-${version}.tar.xz";
26 outputs = [ "out" "man" "doc" ];
28 buildInputs = [ libuuid zlib ];
29 nativeBuildInputs = [ autoreconfHook ];
31 enableParallelBuilding = true;
36 AUTOMATED_TESTING = true; # https://trac.xapian.org/changeset/8be35f5e1/git
37 } // lib.optionalAttrs stdenv.hostPlatform.is32bit {
38 NIX_CFLAGS_COMPILE = "-fpermissive";
41 # the configure script thinks that Darwin has ___exp10
42 # but it’s not available on my systems (or hydra apparently)
43 postConfigure = lib.optionalString stdenv.hostPlatform.isDarwin ''
44 substituteInPlace config.h \
45 --replace "#define HAVE___EXP10 1" "#undef HAVE___EXP10"
49 inherit mu xapian-omega;
50 inherit (perlPackages) SearchXapian;
51 python-xapian = python3.pkgs.xapian;
55 description = "Search engine library";
56 homepage = "https://xapian.org/";
57 changelog = "https://xapian.org/docs/xapian-core-${version}/NEWS";
58 license = licenses.gpl2Plus;
59 maintainers = with maintainers; [ matthiasbeyer ];
60 platforms = platforms.unix;
64 # Don't forget to change the hashes in xapian-omega and
65 # python3Packages.xapian. They inherit the version from this package, and
66 # should always be built with the equivalent xapian version.
67 xapian_1_4 = generic "1.4.26" "sha256-nmp5A4BpZtFs4iC0k3fJyPrWZ8jw/8sjo0QpRiaTY6c=";