kdePackages.akonadi: restore mysql backend

I guess we're stuck with it for the time being.
This commit is contained in:
K900 2024-03-01 12:10:56 +03:00
parent 13a94ad1fb
commit 299251e8d4
2 changed files with 23 additions and 2 deletions

View file

@ -1,16 +1,25 @@
{
lib,
mkKdeDerivation,
qttools,
accounts-qt,
kaccounts-integration,
shared-mime-info,
xz,
mariadb,
}:
mkKdeDerivation {
pname = "akonadi";
# FIXME(later): investigate nixpkgs patches
patches = [
# Always regenerate MySQL config, as the store paths don't have accurate timestamps
./ignore-mysql-config-timestamp.patch
];
extraCmakeFlags = [
"-DMYSQLD_SCRIPTS_PATH=${lib.getBin mariadb}/bin"
];
extraNativeBuildInputs = [qttools shared-mime-info];
extraBuildInputs = [kaccounts-integration accounts-qt xz];
extraBuildInputs = [kaccounts-integration accounts-qt xz mariadb];
}

View file

@ -0,0 +1,12 @@
--- a/src/server/storage/dbconfigmysql.cpp
+++ b/src/server/storage/dbconfigmysql.cpp
@@ -241,8 +241,7 @@ bool DbConfigMysql::startInternalServer()
bool confUpdate = false;
QFile actualFile(actualConfig);
// update conf only if either global (or local) is newer than actual
- if ((QFileInfo(globalConfig).lastModified() > QFileInfo(actualFile).lastModified())
- || (QFileInfo(localConfig).lastModified() > QFileInfo(actualFile).lastModified())) {
+ if (true) {
QFile globalFile(globalConfig);
QFile localFile(localConfig);
if (globalFile.open(QFile::ReadOnly) && actualFile.open(QFile::WriteOnly)) {