mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 07:53:19 +00:00
Merge pull request #182195 from 2xsaiko/outgoing/pg-akonadi
akonadi: Add package argument for PostgreSQL support
This commit is contained in:
commit
25f0238d68
@ -2,10 +2,16 @@
|
|||||||
mkDerivation, lib, kdepimTeam,
|
mkDerivation, lib, kdepimTeam,
|
||||||
extra-cmake-modules, shared-mime-info, qtbase, accounts-qt,
|
extra-cmake-modules, shared-mime-info, qtbase, accounts-qt,
|
||||||
boost, kaccounts-integration, kcompletion, kconfigwidgets, kcrash, kdbusaddons,
|
boost, kaccounts-integration, kcompletion, kconfigwidgets, kcrash, kdbusaddons,
|
||||||
kdesignerplugin, ki18n, kiconthemes, kio, kitemmodels, kwindowsystem, mariadb, qttools,
|
kdesignerplugin, ki18n, kiconthemes, kio, kitemmodels, kwindowsystem, mariadb,
|
||||||
signond, xz,
|
postgresql, qttools, signond, xz,
|
||||||
|
|
||||||
|
mysqlSupport ? true,
|
||||||
|
postgresSupport ? false,
|
||||||
|
defaultDriver ? if mysqlSupport then "MYSQL" else "POSTGRES",
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
assert mysqlSupport || postgresSupport;
|
||||||
|
|
||||||
mkDerivation {
|
mkDerivation {
|
||||||
pname = "akonadi";
|
pname = "akonadi";
|
||||||
meta = {
|
meta = {
|
||||||
@ -26,17 +32,19 @@ mkDerivation {
|
|||||||
propagatedBuildInputs = [ boost kitemmodels ];
|
propagatedBuildInputs = [ boost kitemmodels ];
|
||||||
outputs = [ "out" "dev" ];
|
outputs = [ "out" "dev" ];
|
||||||
CXXFLAGS = [
|
CXXFLAGS = [
|
||||||
''-DNIXPKGS_MYSQL_MYSQLD=\"${lib.getBin mariadb}/bin/mysqld\"''
|
''-DNIXPKGS_MYSQL_MYSQLD=\"${lib.optionalString mysqlSupport "${lib.getBin mariadb}/bin/mysqld"}\"''
|
||||||
''-DNIXPKGS_MYSQL_MYSQLADMIN=\"${lib.getBin mariadb}/bin/mysqladmin\"''
|
''-DNIXPKGS_MYSQL_MYSQLADMIN=\"${lib.optionalString mysqlSupport "${lib.getBin mariadb}/bin/mysqladmin"}\"''
|
||||||
''-DNIXPKGS_MYSQL_MYSQL_INSTALL_DB=\"${lib.getBin mariadb}/bin/mysql_install_db\"''
|
''-DNIXPKGS_MYSQL_MYSQL_INSTALL_DB=\"${lib.optionalString mysqlSupport "${lib.getBin mariadb}/bin/mysql_install_db"}\"''
|
||||||
''-DNIXPKGS_MYSQL_MYSQLCHECK=\"${lib.getBin mariadb}/bin/mysqlcheck\"''
|
''-DNIXPKGS_MYSQL_MYSQLCHECK=\"${lib.optionalString mysqlSupport "${lib.getBin mariadb}/bin/mysqlcheck"}\"''
|
||||||
''-DNIXPKGS_POSTGRES_PG_CTL=\"\"''
|
''-DNIXPKGS_POSTGRES_PG_CTL=\"${lib.optionalString postgresSupport "${lib.getBin postgresql}/bin/pg_ctl"}\"''
|
||||||
''-DNIXPKGS_POSTGRES_PG_UPGRADE=\"\"''
|
''-DNIXPKGS_POSTGRES_PG_UPGRADE=\"${lib.optionalString postgresSupport "${lib.getBin postgresql}/bin/pg_upgrade"}\"''
|
||||||
''-DNIXPKGS_POSTGRES_INITDB=\"\"''
|
''-DNIXPKGS_POSTGRES_INITDB=\"${lib.optionalString postgresSupport "${lib.getBin postgresql}/bin/initdb"}\"''
|
||||||
''-DNIX_OUT=\"${placeholder "out"}\"''
|
''-DNIX_OUT=\"${placeholder "out"}\"''
|
||||||
''-I${lib.getDev kio}/include/KF5'' # Fixes: kio_version.h: No such file or directory
|
''-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
|
# compatibility symlinks for kmymoney, can probably be removed in next kde bump
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
ln -s $dev/include/KF5/AkonadiCore/Akonadi/Collection $dev/include/KF5/AkonadiCore/Collection
|
ln -s $dev/include/KF5/AkonadiCore/Akonadi/Collection $dev/include/KF5/AkonadiCore/Collection
|
||||||
|
Loading…
Reference in New Issue
Block a user