From 31c192438e32a38d9d9937cf93a0e4a9cee72cd5 Mon Sep 17 00:00:00 2001 From: euxane Date: Wed, 22 Jan 2025 19:57:02 +0100 Subject: [PATCH 1/2] dovecot-fts-flatcurve: init at 1.0.5 Note: this plugin will be integrated into Dovecot/core in 2.4. In the meantime, it has to be used as a separate plugin for 2.3. --- .../do/dovecot-fts-flatcurve/package.nix | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 pkgs/by-name/do/dovecot-fts-flatcurve/package.nix diff --git a/pkgs/by-name/do/dovecot-fts-flatcurve/package.nix b/pkgs/by-name/do/dovecot-fts-flatcurve/package.nix new file mode 100644 index 000000000000..65dac4a74402 --- /dev/null +++ b/pkgs/by-name/do/dovecot-fts-flatcurve/package.nix @@ -0,0 +1,43 @@ +{ + lib, + stdenv, + fetchFromGitHub, + autoreconfHook, + pkg-config, + dovecot, + xapian, +}: + +stdenv.mkDerivation rec { + pname = "dovecot-fts-flatcurve"; + version = "1.0.5"; + + src = fetchFromGitHub { + owner = "slusarz"; + repo = "dovecot-fts-flatcurve"; + rev = "refs/tags/v${version}"; + hash = "sha256-96sR/pl0G0sSjh/YrXdgVgASJPhrL32xHCbBGrDxzoU="; + }; + + buildInputs = [ + xapian + ]; + + nativeBuildInputs = [ + autoreconfHook + pkg-config + ]; + + configureFlags = [ + "--with-dovecot=${dovecot}/lib/dovecot" + "--with-moduledir=$(out)/lib/dovecot" + ]; + + meta = with lib; { + homepage = "https://slusarz.github.io/dovecot-fts-flatcurve/"; + description = "Dovecot FTS Flatcurve plugin (Xapian)"; + license = licenses.lgpl21Only; + maintainers = with maintainers; [ euxane ]; + platforms = platforms.unix; + }; +} From 788d769a642ba5e8bf856cf569f4d4ea9dba4725 Mon Sep 17 00:00:00 2001 From: euxane Date: Wed, 22 Jan 2025 19:56:54 +0100 Subject: [PATCH 2/2] dovecot: build with textcat This allows the integrated Full-Text Search plugin to detect languages when indexing. --- pkgs/servers/mail/dovecot/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/servers/mail/dovecot/default.nix b/pkgs/servers/mail/dovecot/default.nix index ebfb9be622c6..1eab18bc5fac 100644 --- a/pkgs/servers/mail/dovecot/default.nix +++ b/pkgs/servers/mail/dovecot/default.nix @@ -15,6 +15,7 @@ coreutils, clucene_core_2, icu, + libexttextcat, openldap, libsodium, libstemmer, @@ -48,6 +49,7 @@ stdenv.mkDerivation rec { lz4 clucene_core_2 icu + libexttextcat openldap libsodium libstemmer @@ -131,6 +133,7 @@ stdenv.mkDerivation rec { "--with-ldap" "--with-lucene" "--with-icu" + "--with-textcat" ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "i_cv_epoll_works=${if stdenv.hostPlatform.isLinux then "yes" else "no"}"