diff options
author | Thomas Tuegel <ttuegel@mailbox.org> | 2022-11-05 06:23:15 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-05 06:23:15 -0500 |
commit | 25f0238d68ba0fd912f6f1f5a42a928547f10d8c (patch) | |
tree | f2923b92319b7f63625d8853ef1bb287f5dcb94d | |
parent | ee3d94e233aaeb7a395f15e5de660f7946b03eb5 (diff) | |
parent | f3c2f298c4d40012ed457cfe21ece28f72c0f8e9 (diff) |
Merge pull request #182195 from 2xsaiko/outgoing/pg-akonadi
akonadi: Add package argument for PostgreSQL support
-rw-r--r-- | pkgs/applications/kde/akonadi/default.nix | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/pkgs/applications/kde/akonadi/default.nix b/pkgs/applications/kde/akonadi/default.nix index 94c948c1c4ea7..8fa12be3a8b60 100644 --- a/pkgs/applications/kde/akonadi/default.nix +++ b/pkgs/applications/kde/akonadi/default.nix @@ -2,10 +2,16 @@ mkDerivation, lib, kdepimTeam, extra-cmake-modules, shared-mime-info, qtbase, accounts-qt, boost, kaccounts-integration, kcompletion, kconfigwidgets, kcrash, kdbusaddons, - kdesignerplugin, ki18n, kiconthemes, kio, kitemmodels, kwindowsystem, mariadb, qttools, - signond, xz, + kdesignerplugin, ki18n, kiconthemes, kio, kitemmodels, kwindowsystem, mariadb, + postgresql, qttools, signond, xz, + + mysqlSupport ? true, + postgresSupport ? false, + defaultDriver ? if mysqlSupport then "MYSQL" else "POSTGRES", }: +assert mysqlSupport || postgresSupport; + mkDerivation { pname = "akonadi"; meta = { @@ -26,17 +32,19 @@ mkDerivation { propagatedBuildInputs = [ boost kitemmodels ]; outputs = [ "out" "dev" ]; CXXFLAGS = [ - ''-DNIXPKGS_MYSQL_MYSQLD=\"${lib.getBin mariadb}/bin/mysqld\"'' - ''-DNIXPKGS_MYSQL_MYSQLADMIN=\"${lib.getBin mariadb}/bin/mysqladmin\"'' - ''-DNIXPKGS_MYSQL_MYSQL_INSTALL_DB=\"${lib.getBin mariadb}/bin/mysql_install_db\"'' - ''-DNIXPKGS_MYSQL_MYSQLCHECK=\"${lib.getBin mariadb}/bin/mysqlcheck\"'' - ''-DNIXPKGS_POSTGRES_PG_CTL=\"\"'' - ''-DNIXPKGS_POSTGRES_PG_UPGRADE=\"\"'' - ''-DNIXPKGS_POSTGRES_INITDB=\"\"'' + ''-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"}\"'' ''-DNIX_OUT=\"${placeholder "out"}\"'' ''-I${lib.getDev kio}/include/KF5'' # Fixes: kio_version.h: No such file or directory ]; + cmakeFlags = lib.optional (defaultDriver != "MYSQL") "-DDATABASE_BACKEND=${defaultDriver}"; + # compatibility symlinks for kmymoney, can probably be removed in next kde bump postInstall = '' ln -s $dev/include/KF5/AkonadiCore/Akonadi/Collection $dev/include/KF5/AkonadiCore/Collection |