netatalk: enable Spotlight search

netatalk 4.5.0 can now build with Spotlight support, but was not
enabled because the cnid default lightweight backend requires `talloc`.

Add `talloc` so the cnid Spotlight backend is built out of the box.

Also add opt-in flags for the heavier backends, both default off:

  - xapianSupport
  - localsearchSupport
This commit is contained in:
Eric Helgeson
2026-06-01 08:27:30 -05:00
parent 6224380a3c
commit 8bc5acd2a0
+41
View File
@@ -26,6 +26,15 @@
iniparser,
pandoc,
sqlite,
talloc,
xapian,
flex,
bison,
dconf,
localsearch,
tinysparql,
xapianSupport ? false,
localsearchSupport ? false,
}:
stdenv.mkDerivation (finalAttrs: {
@@ -42,6 +51,10 @@ stdenv.mkDerivation (finalAttrs: {
meson
ninja
file
]
++ lib.optionals localsearchSupport [
flex
bison
];
buildInputs = [
@@ -64,6 +77,16 @@ stdenv.mkDerivation (finalAttrs: {
iniparser
pandoc
sqlite
talloc
]
++ lib.optionals xapianSupport [
xapian
file
]
++ lib.optionals localsearchSupport [
tinysparql
dconf
localsearch
];
mesonFlags = [
@@ -77,8 +100,26 @@ stdenv.mkDerivation (finalAttrs: {
"-Dwith-cracklib=true"
"-Dwith-cracklib-path=${cracklib.out}"
"-Dwith-statedir-creation=false"
"-Dwith-spotlight-backends=${
lib.concatStringsSep "," (
[ "cnid" ] ++ lib.optional xapianSupport "xapian" ++ lib.optional localsearchSupport "localsearch"
)
}"
];
# TODO: drop once upstream makes this path configurable.
postPatch = lib.optionalString localsearchSupport ''
substituteInPlace meson.build \
--replace-fail "install_emptydir('/etc/dconf/db')" "install_emptydir('etc/dconf/db')"
substituteInPlace config/dconf/meson.build \
--replace-fail "install_dir: '/etc/dconf/profile'" "install_dir: 'etc/dconf/profile'"
'';
# netatalk probes for the LocalSearch schema at configure time.
preConfigure = lib.optionalString localsearchSupport ''
export XDG_DATA_DIRS="''${XDG_DATA_DIRS:+$XDG_DATA_DIRS:}${localsearch}/share/gsettings-schemas/localsearch-${localsearch.version}"
'';
enableParallelBuilding = true;
meta = {