uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
165
pkgs/servers/mail/dovecot/2.3.x-module_dir.patch
Normal file
165
pkgs/servers/mail/dovecot/2.3.x-module_dir.patch
Normal file
|
|
@ -0,0 +1,165 @@
|
|||
diff -ru dovecot-2.3.9.2.orig/src/auth/main.c dovecot-2.3.9.2/src/auth/main.c
|
||||
--- dovecot-2.3.9.2.orig/src/auth/main.c 2019-12-13 14:12:00.000000000 +0100
|
||||
+++ dovecot-2.3.9.2/src/auth/main.c 2019-12-15 19:46:52.101597499 +0100
|
||||
@@ -191,7 +191,7 @@
|
||||
mod_set.debug = global_auth_settings->debug;
|
||||
mod_set.filter_callback = auth_module_filter;
|
||||
|
||||
- modules = module_dir_load(AUTH_MODULE_DIR, NULL, &mod_set);
|
||||
+ modules = module_dir_load("/etc/dovecot/modules/auth", NULL, &mod_set);
|
||||
module_dir_init(modules);
|
||||
|
||||
if (!worker)
|
||||
@@ -222,7 +222,7 @@
|
||||
mod_set.debug = global_auth_settings->debug;
|
||||
mod_set.ignore_missing = TRUE;
|
||||
|
||||
- modules = module_dir_load_missing(modules, AUTH_MODULE_DIR, names,
|
||||
+ modules = module_dir_load_missing(modules, "/etc/dovecot/modules/auth", names,
|
||||
&mod_set);
|
||||
module_dir_init(modules);
|
||||
}
|
||||
diff -ru dovecot-2.3.9.2.orig/src/config/all-settings.c dovecot-2.3.9.2/src/config/all-settings.c
|
||||
--- dovecot-2.3.9.2.orig/src/config/all-settings.c 2019-12-13 14:12:32.000000000 +0100
|
||||
+++ dovecot-2.3.9.2/src/config/all-settings.c 2019-12-15 19:49:42.764650074 +0100
|
||||
@@ -1080,7 +1080,7 @@
|
||||
.last_valid_gid = 0,
|
||||
|
||||
.mail_plugins = "",
|
||||
- .mail_plugin_dir = MODULEDIR,
|
||||
+ .mail_plugin_dir = "/etc/dovecot/modules",
|
||||
|
||||
.mail_log_prefix = "%s(%u)<%{pid}><%{session}>: ",
|
||||
|
||||
@@ -3849,7 +3849,7 @@
|
||||
.login_log_format = "%$: %s",
|
||||
.login_access_sockets = "",
|
||||
.login_proxy_notify_path = "proxy-notify",
|
||||
- .login_plugin_dir = MODULEDIR"/login",
|
||||
+ .login_plugin_dir = "/etc/dovecot/modules""/login",
|
||||
.login_plugins = "",
|
||||
.login_proxy_max_disconnect_delay = 0,
|
||||
.director_username_hash = "%u",
|
||||
@@ -4058,7 +4058,7 @@
|
||||
.login_trusted_networks = "",
|
||||
|
||||
.mail_plugins = "",
|
||||
- .mail_plugin_dir = MODULEDIR,
|
||||
+ .mail_plugin_dir = "/etc/dovecot/modules",
|
||||
};
|
||||
static const struct setting_parser_info *lmtp_setting_dependencies[] = {
|
||||
&lda_setting_parser_info,
|
||||
@@ -4823,7 +4823,7 @@
|
||||
.base_dir = PKG_RUNDIR,
|
||||
.libexec_dir = PKG_LIBEXECDIR,
|
||||
.mail_plugins = "",
|
||||
- .mail_plugin_dir = MODULEDIR,
|
||||
+ .mail_plugin_dir = "/etc/dovecot/modules",
|
||||
.mail_temp_dir = "/tmp",
|
||||
.auth_debug = FALSE,
|
||||
.auth_socket_path = "auth-userdb",
|
||||
diff -ru dovecot-2.3.9.2.orig/src/config/config-parser.c dovecot-2.3.9.2/src/config/config-parser.c
|
||||
--- dovecot-2.3.9.2.orig/src/config/config-parser.c 2019-12-13 14:12:00.000000000 +0100
|
||||
+++ dovecot-2.3.9.2/src/config/config-parser.c 2019-12-15 19:46:52.102597505 +0100
|
||||
@@ -1077,7 +1077,7 @@
|
||||
|
||||
i_zero(&mod_set);
|
||||
mod_set.abi_version = DOVECOT_ABI_VERSION;
|
||||
- modules = module_dir_load(CONFIG_MODULE_DIR, NULL, &mod_set);
|
||||
+ modules = module_dir_load("/etc/dovecot/modules/settings", NULL, &mod_set);
|
||||
module_dir_init(modules);
|
||||
|
||||
i_array_init(&new_roots, 64);
|
||||
diff -ru dovecot-2.3.9.2.orig/src/dict/main.c dovecot-2.3.9.2/src/dict/main.c
|
||||
--- dovecot-2.3.9.2.orig/src/dict/main.c 2019-12-13 14:12:00.000000000 +0100
|
||||
+++ dovecot-2.3.9.2/src/dict/main.c 2019-12-15 19:46:52.102597505 +0100
|
||||
@@ -104,7 +104,7 @@
|
||||
mod_set.abi_version = DOVECOT_ABI_VERSION;
|
||||
mod_set.require_init_funcs = TRUE;
|
||||
|
||||
- modules = module_dir_load(DICT_MODULE_DIR, NULL, &mod_set);
|
||||
+ modules = module_dir_load("/etc/dovecot/modules/dict", NULL, &mod_set);
|
||||
module_dir_init(modules);
|
||||
|
||||
/* Register only after loading modules. They may contain SQL drivers,
|
||||
diff -ru dovecot-2.3.9.2.orig/src/doveadm/doveadm-settings.c dovecot-2.3.9.2/src/doveadm/doveadm-settings.c
|
||||
--- dovecot-2.3.9.2.orig/src/doveadm/doveadm-settings.c 2019-12-13 14:12:00.000000000 +0100
|
||||
+++ dovecot-2.3.9.2/src/doveadm/doveadm-settings.c 2019-12-15 19:47:29.525812499 +0100
|
||||
@@ -89,7 +89,7 @@
|
||||
.base_dir = PKG_RUNDIR,
|
||||
.libexec_dir = PKG_LIBEXECDIR,
|
||||
.mail_plugins = "",
|
||||
- .mail_plugin_dir = MODULEDIR,
|
||||
+ .mail_plugin_dir = "/etc/dovecot/modules",
|
||||
.mail_temp_dir = "/tmp",
|
||||
.auth_debug = FALSE,
|
||||
.auth_socket_path = "auth-userdb",
|
||||
diff -ru dovecot-2.3.9.2.orig/src/doveadm/doveadm-util.c dovecot-2.3.9.2/src/doveadm/doveadm-util.c
|
||||
--- dovecot-2.3.9.2.orig/src/doveadm/doveadm-util.c 2019-12-13 14:12:00.000000000 +0100
|
||||
+++ dovecot-2.3.9.2/src/doveadm/doveadm-util.c 2019-12-15 19:52:32.003844670 +0100
|
||||
@@ -33,7 +33,7 @@
|
||||
mod_set.debug = doveadm_debug;
|
||||
mod_set.ignore_dlopen_errors = TRUE;
|
||||
|
||||
- modules = module_dir_load_missing(modules, DOVEADM_MODULEDIR,
|
||||
+ modules = module_dir_load_missing(modules, "/etc/dovecot/modules/doveadm",
|
||||
NULL, &mod_set);
|
||||
module_dir_init(modules);
|
||||
}
|
||||
@@ -58,7 +58,7 @@
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
- dir = opendir(DOVEADM_MODULEDIR);
|
||||
+ dir = opendir("/etc/dovecot/modules/doveadm");
|
||||
if (dir == NULL)
|
||||
return FALSE;
|
||||
|
||||
diff -ru dovecot-2.3.9.2.orig/src/lib-fs/fs-api.c dovecot-2.3.9.2/src/lib-fs/fs-api.c
|
||||
--- dovecot-2.3.9.2.orig/src/lib-fs/fs-api.c 2019-12-13 14:12:00.000000000 +0100
|
||||
+++ dovecot-2.3.9.2/src/lib-fs/fs-api.c 2019-12-15 19:46:52.102597505 +0100
|
||||
@@ -114,7 +114,7 @@
|
||||
mod_set.abi_version = DOVECOT_ABI_VERSION;
|
||||
mod_set.ignore_missing = TRUE;
|
||||
|
||||
- fs_modules = module_dir_load_missing(fs_modules, MODULE_DIR,
|
||||
+ fs_modules = module_dir_load_missing(fs_modules, "/etc/dovecot/modules",
|
||||
module_name, &mod_set);
|
||||
module_dir_init(fs_modules);
|
||||
|
||||
diff -ru dovecot-2.3.9.2.orig/src/lib-ssl-iostream/iostream-ssl.c dovecot-2.3.9.2/src/lib-ssl-iostream/iostream-ssl.c
|
||||
--- dovecot-2.3.9.2.orig/src/lib-ssl-iostream/iostream-ssl.c 2019-12-13 14:12:00.000000000 +0100
|
||||
+++ dovecot-2.3.9.2/src/lib-ssl-iostream/iostream-ssl.c 2019-12-15 19:46:52.102597505 +0100
|
||||
@@ -54,7 +54,7 @@
|
||||
mod_set.abi_version = DOVECOT_ABI_VERSION;
|
||||
mod_set.setting_name = "<built-in lib-ssl-iostream lookup>";
|
||||
mod_set.require_init_funcs = TRUE;
|
||||
- ssl_module = module_dir_load(MODULE_DIR, plugin_name, &mod_set);
|
||||
+ ssl_module = module_dir_load("/etc/dovecot/modules", plugin_name, &mod_set);
|
||||
if (module_dir_try_load_missing(&ssl_module, MODULE_DIR, plugin_name,
|
||||
&mod_set, error_r) < 0)
|
||||
return -1;
|
||||
diff -ru dovecot-2.3.9.2.orig/src/lib-storage/mail-storage-settings.c dovecot-2.3.9.2/src/lib-storage/mail-storage-settings.c
|
||||
--- dovecot-2.3.9.2.orig/src/lib-storage/mail-storage-settings.c 2019-12-13 14:12:00.000000000 +0100
|
||||
+++ dovecot-2.3.9.2/src/lib-storage/mail-storage-settings.c 2019-12-15 19:46:52.102597505 +0100
|
||||
@@ -337,7 +337,7 @@
|
||||
.last_valid_gid = 0,
|
||||
|
||||
.mail_plugins = "",
|
||||
- .mail_plugin_dir = MODULEDIR,
|
||||
+ .mail_plugin_dir = "/etc/dovecot/modules",
|
||||
|
||||
.mail_log_prefix = "%s(%u)<%{pid}><%{session}>: ",
|
||||
|
||||
diff -ru dovecot-2.3.9.2.orig/src/lmtp/lmtp-settings.c dovecot-2.3.9.2/src/lmtp/lmtp-settings.c
|
||||
--- dovecot-2.3.9.2.orig/src/lmtp/lmtp-settings.c 2019-12-13 14:12:00.000000000 +0100
|
||||
+++ dovecot-2.3.9.2/src/lmtp/lmtp-settings.c 2019-12-15 19:46:52.102597505 +0100
|
||||
@@ -95,7 +95,7 @@
|
||||
.login_trusted_networks = "",
|
||||
|
||||
.mail_plugins = "",
|
||||
- .mail_plugin_dir = MODULEDIR,
|
||||
+ .mail_plugin_dir = "/etc/dovecot/modules",
|
||||
};
|
||||
|
||||
static const struct setting_parser_info *lmtp_setting_dependencies[] = {
|
||||
111
pkgs/servers/mail/dovecot/default.nix
Normal file
111
pkgs/servers/mail/dovecot/default.nix
Normal file
|
|
@ -0,0 +1,111 @@
|
|||
{ stdenv, lib, fetchurl, perl, pkg-config, systemd, openssl
|
||||
, bzip2, zlib, lz4, inotify-tools, pam, libcap, coreutils
|
||||
, clucene_core_2, icu, openldap, libsodium, libstemmer, cyrus_sasl
|
||||
, nixosTests
|
||||
# Auth modules
|
||||
, withMySQL ? false, libmysqlclient
|
||||
, withPgSQL ? false, postgresql
|
||||
, withSQLite ? true, sqlite
|
||||
, withLua ? false, lua5_3
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "dovecot";
|
||||
version = "2.3.19";
|
||||
|
||||
nativeBuildInputs = [ perl pkg-config ];
|
||||
buildInputs =
|
||||
[ openssl bzip2 zlib lz4 clucene_core_2 icu openldap libsodium libstemmer cyrus_sasl.dev ]
|
||||
++ lib.optionals (stdenv.isLinux) [ systemd pam libcap inotify-tools ]
|
||||
++ lib.optional withMySQL libmysqlclient
|
||||
++ lib.optional withPgSQL postgresql
|
||||
++ lib.optional withSQLite sqlite
|
||||
++ lib.optional withLua lua5_3;
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://dovecot.org/releases/${lib.versions.majorMinor version}/${pname}-${version}.tar.gz";
|
||||
hash = "sha256:0ys3zq9b1rgj1cz6a0i9l421y6h2j3b5zak2ia5j9dj1sj9zcwq1";
|
||||
};
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
postPatch = ''
|
||||
sed -i -E \
|
||||
-e 's!/bin/sh\b!${stdenv.shell}!g' \
|
||||
-e 's!([^[:alnum:]/_-])/bin/([[:alnum:]]+)\b!\1${coreutils}/bin/\2!g' \
|
||||
-e 's!([^[:alnum:]/_-])(head|sleep|cat)\b!\1${coreutils}/bin/\2!g' \
|
||||
src/lib-program-client/test-program-client-local.c
|
||||
|
||||
patchShebangs src/lib-smtp/test-bin/*.sh
|
||||
sed -i -s -E 's!\bcat\b!${coreutils}/bin/cat!g' src/lib-smtp/test-bin/*.sh
|
||||
|
||||
patchShebangs src/config/settings-get.pl
|
||||
'' + lib.optionalString stdenv.isLinux ''
|
||||
export systemdsystemunitdir=$out/etc/systemd/system
|
||||
'';
|
||||
|
||||
# We need this for sysconfdir, see remark below.
|
||||
installFlags = [ "DESTDIR=$(out)" ];
|
||||
|
||||
postInstall = ''
|
||||
cp -r $out/$out/* $out
|
||||
rm -rf $out/$(echo "$out" | cut -d "/" -f2)
|
||||
'';
|
||||
|
||||
patches = [
|
||||
# Make dovecot look for plugins in /etc/dovecot/modules
|
||||
# so we can symlink plugins from several packages there.
|
||||
# The symlinking needs to be done in NixOS.
|
||||
./2.3.x-module_dir.patch
|
||||
];
|
||||
|
||||
configureFlags = [
|
||||
# It will hardcode this for /var/lib/dovecot.
|
||||
# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=626211
|
||||
"--localstatedir=/var"
|
||||
# We need this so utilities default to reading /etc/dovecot/dovecot.conf file.
|
||||
"--sysconfdir=/etc"
|
||||
"--with-ldap"
|
||||
"--with-ssl=openssl"
|
||||
"--with-zlib"
|
||||
"--with-bzlib"
|
||||
"--with-lz4"
|
||||
"--with-ldap"
|
||||
"--with-lucene"
|
||||
"--with-icu"
|
||||
] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
|
||||
"i_cv_epoll_works=${if stdenv.isLinux then "yes" else "no"}"
|
||||
"i_cv_posix_fallocate_works=${if stdenv.isDarwin then "no" else "yes"}"
|
||||
"i_cv_inotify_works=${if stdenv.isLinux then "yes" else "no"}"
|
||||
"i_cv_signed_size_t=no"
|
||||
"i_cv_signed_time_t=yes"
|
||||
"i_cv_c99_vsnprintf=yes"
|
||||
"lib_cv_va_copy=yes"
|
||||
"i_cv_mmap_plays_with_write=yes"
|
||||
"i_cv_gmtime_max_time_t=${toString stdenv.hostPlatform.parsed.cpu.bits}"
|
||||
"i_cv_signed_time_t=yes"
|
||||
"i_cv_fd_passing=yes"
|
||||
"lib_cv_va_copy=yes"
|
||||
"lib_cv___va_copy=yes"
|
||||
"lib_cv_va_val_copy=yes"
|
||||
] ++ lib.optional stdenv.isLinux "--with-systemd"
|
||||
++ lib.optional stdenv.isDarwin "--enable-static"
|
||||
++ lib.optional withMySQL "--with-mysql"
|
||||
++ lib.optional withPgSQL "--with-pgsql"
|
||||
++ lib.optional withSQLite "--with-sqlite"
|
||||
++ lib.optional withLua "--with-lua";
|
||||
|
||||
doCheck = !stdenv.isDarwin;
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://dovecot.org/";
|
||||
description = "Open source IMAP and POP3 email server written with security primarily in mind";
|
||||
license = with licenses; [ mit publicDomain lgpl21Only bsd3 bsdOriginal ];
|
||||
maintainers = with maintainers; [ fpletz globin ajs124 ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
passthru.tests = {
|
||||
opensmtpd-interaction = nixosTests.opensmtpd;
|
||||
inherit (nixosTests) dovecot;
|
||||
};
|
||||
}
|
||||
36
pkgs/servers/mail/dovecot/plugins/fts_xapian/default.nix
Normal file
36
pkgs/servers/mail/dovecot/plugins/fts_xapian/default.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{ lib, stdenv, fetchFromGitHub, autoconf, automake, sqlite, pkg-config, dovecot, libtool, xapian, icu64 }:
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "dovecot-fts-xapian";
|
||||
version = "1.5.5";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "grosjo";
|
||||
repo = "fts-xapian";
|
||||
rev = version;
|
||||
sha256 = "sha256-KAZno4N/4dFH3QHFTs0wkY4PtGF+j4ZEjZzn9ljCjrM=";
|
||||
};
|
||||
|
||||
buildInputs = [ dovecot xapian icu64 sqlite ];
|
||||
|
||||
nativeBuildInputs = [ autoconf automake libtool pkg-config ];
|
||||
|
||||
preConfigure = ''
|
||||
export PANDOC=false
|
||||
autoreconf -vi
|
||||
'';
|
||||
|
||||
configureFlags = [
|
||||
"--with-dovecot=${dovecot}/lib/dovecot"
|
||||
"--with-moduledir=$(out)/lib/dovecot"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/grosjo/fts-xapian";
|
||||
description = "Dovecot FTS plugin based on Xapian";
|
||||
changelog = "https://github.com/grosjo/fts-xapian/releases";
|
||||
license = licenses.lgpl21Only;
|
||||
maintainers = with maintainers; [ julm symphorien ];
|
||||
platforms = platforms.unix;
|
||||
broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/dovecot_fts_xapian.x86_64-darwin
|
||||
};
|
||||
}
|
||||
39
pkgs/servers/mail/dovecot/plugins/pigeonhole/default.nix
Normal file
39
pkgs/servers/mail/dovecot/plugins/pigeonhole/default.nix
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
{ lib, stdenv, fetchurl, dovecot, openssl }:
|
||||
let
|
||||
dovecotMajorMinor = lib.versions.majorMinor dovecot.version;
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "dovecot-pigeonhole";
|
||||
version = "0.5.19";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://pigeonhole.dovecot.org/releases/${dovecotMajorMinor}/dovecot-${dovecotMajorMinor}-pigeonhole-${version}.tar.gz";
|
||||
hash = "sha256:033kkhby9k9yrmgvlfmyzp8fccsw5bhq1dyvxj94sg3grkpj7f8h";
|
||||
};
|
||||
|
||||
buildInputs = [ dovecot openssl ];
|
||||
|
||||
preConfigure = ''
|
||||
substituteInPlace src/managesieve/managesieve-settings.c --replace \
|
||||
".executable = \"managesieve\"" \
|
||||
".executable = \"$out/libexec/dovecot/managesieve\""
|
||||
substituteInPlace src/managesieve-login/managesieve-login-settings.c --replace \
|
||||
".executable = \"managesieve-login\"" \
|
||||
".executable = \"$out/libexec/dovecot/managesieve-login\""
|
||||
'';
|
||||
|
||||
configureFlags = [
|
||||
"--with-dovecot=${dovecot}/lib/dovecot"
|
||||
"--without-dovecot-install-dirs"
|
||||
"--with-moduledir=$(out)/lib/dovecot"
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://pigeonhole.dovecot.org/";
|
||||
description = "A sieve plugin for the Dovecot IMAP server";
|
||||
license = licenses.lgpl21Only;
|
||||
maintainers = with maintainers; [ globin ajs124 ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue