2017-05-10 01:24:46 +02:00
|
|
|
{
|
2021-11-13 23:28:25 +01:00
|
|
|
mkDerivation, lib, kdepimTeam,
|
2023-03-17 23:58:24 +01:00
|
|
|
extra-cmake-modules, shared-mime-info, accounts-qt,
|
2020-12-30 00:43:33 +01:00
|
|
|
boost, kaccounts-integration, kcompletion, kconfigwidgets, kcrash, kdbusaddons,
|
2022-07-20 12:38:39 +02:00
|
|
|
kdesignerplugin, ki18n, kiconthemes, kio, kitemmodels, kwindowsystem, mariadb,
|
|
|
|
postgresql, qttools, signond, xz,
|
|
|
|
|
|
|
|
mysqlSupport ? true,
|
|
|
|
postgresSupport ? false,
|
|
|
|
defaultDriver ? if mysqlSupport then "MYSQL" else "POSTGRES",
|
2017-05-10 01:24:46 +02:00
|
|
|
}:
|
|
|
|
|
2022-07-20 12:38:39 +02:00
|
|
|
assert mysqlSupport || postgresSupport;
|
|
|
|
|
2017-05-10 01:24:46 +02:00
|
|
|
mkDerivation {
|
2020-12-25 00:05:07 +01:00
|
|
|
pname = "akonadi";
|
2017-05-10 01:24:46 +02:00
|
|
|
meta = {
|
|
|
|
license = [ lib.licenses.lgpl21 ];
|
2017-06-21 15:38:39 +02:00
|
|
|
maintainers = kdepimTeam;
|
2017-05-10 01:24:46 +02:00
|
|
|
};
|
2020-07-13 18:48:47 +02:00
|
|
|
patches = [
|
|
|
|
./0001-akonadi-paths.patch
|
|
|
|
./0002-akonadi-timestamps.patch
|
|
|
|
./0003-akonadi-revert-make-relocatable.patch
|
|
|
|
];
|
2018-02-25 03:23:58 +01:00
|
|
|
nativeBuildInputs = [ extra-cmake-modules shared-mime-info ];
|
2017-05-10 01:24:46 +02:00
|
|
|
buildInputs = [
|
2020-12-30 00:43:33 +01:00
|
|
|
kaccounts-integration kcompletion kconfigwidgets kcrash kdbusaddons kdesignerplugin
|
2021-03-14 19:12:53 +01:00
|
|
|
ki18n kiconthemes kio kwindowsystem xz accounts-qt qttools signond
|
2017-05-10 01:24:46 +02:00
|
|
|
];
|
|
|
|
propagatedBuildInputs = [ boost kitemmodels ];
|
2017-06-21 15:44:44 +02:00
|
|
|
outputs = [ "out" "dev" ];
|
2018-01-19 10:00:03 +01:00
|
|
|
CXXFLAGS = [
|
2022-07-20 12:38:39 +02: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-04-27 23:36:43 +02:00
|
|
|
''-DNIX_OUT=\"${placeholder "out"}\"''
|
2021-04-29 12:52:22 +02:00
|
|
|
''-I${lib.getDev kio}/include/KF5'' # Fixes: kio_version.h: No such file or directory
|
2017-05-10 01:24:46 +02:00
|
|
|
];
|
2021-12-18 05:22:13 +01:00
|
|
|
|
2022-07-20 12:38:39 +02:00
|
|
|
cmakeFlags = lib.optional (defaultDriver != "MYSQL") "-DDATABASE_BACKEND=${defaultDriver}";
|
|
|
|
|
2021-12-18 05:22:13 +01:00
|
|
|
postInstall = ''
|
2023-03-17 23:39:35 +01:00
|
|
|
# added as an include directory by cmake files and fails to compile if it's missing
|
|
|
|
mkdir -p "$dev/include/KF5"
|
2021-12-18 05:22:13 +01:00
|
|
|
'';
|
2017-05-10 01:24:46 +02:00
|
|
|
}
|