2020-04-24 23:36:52 +00:00
|
|
|
{
|
2022-10-21 18:38:19 +00:00
|
|
|
mkDerivation, lib, kdepimTeam,
|
2023-03-24 00:07:29 +00:00
|
|
|
extra-cmake-modules, shared-mime-info, accounts-qt,
|
2021-01-05 17:05:55 +00:00
|
|
|
boost, kaccounts-integration, kcompletion, kconfigwidgets, kcrash, kdbusaddons,
|
2022-11-04 12:27:35 +00:00
|
|
|
kdesignerplugin, ki18n, kiconthemes, kio, kitemmodels, kwindowsystem, mariadb,
|
|
|
|
postgresql, qttools, signond, xz,
|
|
|
|
|
|
|
|
mysqlSupport ? true,
|
|
|
|
postgresSupport ? false,
|
|
|
|
defaultDriver ? if mysqlSupport then "MYSQL" else "POSTGRES",
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2022-11-04 12:27:35 +00:00
|
|
|
assert mysqlSupport || postgresSupport;
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
mkDerivation {
|
2021-01-05 17:05:55 +00:00
|
|
|
pname = "akonadi";
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = {
|
|
|
|
license = [ lib.licenses.lgpl21 ];
|
|
|
|
maintainers = kdepimTeam;
|
|
|
|
};
|
2020-07-18 16:06:22 +00:00
|
|
|
patches = [
|
|
|
|
./0001-akonadi-paths.patch
|
|
|
|
./0002-akonadi-timestamps.patch
|
|
|
|
./0003-akonadi-revert-make-relocatable.patch
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
nativeBuildInputs = [ extra-cmake-modules shared-mime-info ];
|
|
|
|
buildInputs = [
|
2021-01-05 17:05:55 +00:00
|
|
|
kaccounts-integration kcompletion kconfigwidgets kcrash kdbusaddons kdesignerplugin
|
2021-04-05 15:23:46 +00:00
|
|
|
ki18n kiconthemes kio kwindowsystem xz accounts-qt qttools signond
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
propagatedBuildInputs = [ boost kitemmodels ];
|
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
CXXFLAGS = [
|
2022-11-04 12:27:35 +00:00
|
|
|
''-DNIXPKGS_MYSQL_MYSQLD=\"${lib.optionalString mysqlSupport "${lib.getBin mariadb}/bin/mysqld"}\"''
|
|
|
|
''-DNIXPKGS_MYSQL_MYSQLADMIN=\"${lib.optionalString mysqlSupport "${lib.getBin mariadb}/bin/mysqladmin"}\"''
|
|
|
|
''-DNIXPKGS_MYSQL_MYSQL_INSTALL_DB=\"${lib.optionalString mysqlSupport "${lib.getBin mariadb}/bin/mysql_install_db"}\"''
|
|
|
|
''-DNIXPKGS_MYSQL_MYSQLCHECK=\"${lib.optionalString mysqlSupport "${lib.getBin mariadb}/bin/mysqlcheck"}\"''
|
|
|
|
''-DNIXPKGS_POSTGRES_PG_CTL=\"${lib.optionalString postgresSupport "${lib.getBin postgresql}/bin/pg_ctl"}\"''
|
|
|
|
''-DNIXPKGS_POSTGRES_PG_UPGRADE=\"${lib.optionalString postgresSupport "${lib.getBin postgresql}/bin/pg_upgrade"}\"''
|
|
|
|
''-DNIXPKGS_POSTGRES_INITDB=\"${lib.optionalString postgresSupport "${lib.getBin postgresql}/bin/initdb"}\"''
|
2021-05-28 09:39:13 +00:00
|
|
|
''-DNIX_OUT=\"${placeholder "out"}\"''
|
|
|
|
''-I${lib.getDev kio}/include/KF5'' # Fixes: kio_version.h: No such file or directory
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
2021-12-19 01:06:50 +00:00
|
|
|
|
2022-11-04 12:27:35 +00:00
|
|
|
cmakeFlags = lib.optional (defaultDriver != "MYSQL") "-DDATABASE_BACKEND=${defaultDriver}";
|
|
|
|
|
2021-12-19 01:06:50 +00:00
|
|
|
postInstall = ''
|
2023-04-29 16:46:19 +00:00
|
|
|
# added as an include directory by cmake files and fails to compile if it's missing
|
|
|
|
mkdir -p "$dev/include/KF5"
|
2021-12-19 01:06:50 +00:00
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
}
|