nixpkgs/pkgs/applications/networking/instant-messengers/psi-plus/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

108 lines
2.2 KiB
Nix
Raw Normal View History

{ lib
, mkDerivation
, fetchFromGitHub
, cmake
, qtbase
, qtmultimedia
, qtimageformats
, qtx11extras
, qttools
, libidn
, qca-qt5
, libXScrnSaver
, hunspell
, libsecret
, libgcrypt
, libotr
, html-tidy
, libgpg-error
, libsignal-protocol-c
2021-05-10 13:09:46 +00:00
, usrsctp
, chatType ? "basic" # See the assertion below for available options
, qtwebkit
, qtwebengine
, enablePlugins ? true
# Voice messages
, voiceMessagesSupport ? true
, gst_all_1
, enablePsiMedia ? false
, pkg-config
2017-03-07 13:21:38 +00:00
}:
assert builtins.elem (lib.toLower chatType) [
"basic" # Basic implementation, no web stuff involved
"webkit" # Legacy one, based on WebKit (see https://wiki.qt.io/Qt_WebKit)
"webengine" # QtWebEngine (see https://wiki.qt.io/QtWebEngine)
];
assert enablePsiMedia -> enablePlugins;
2021-11-14 09:48:46 +00:00
mkDerivation rec {
pname = "psi-plus";
2024-02-08 04:54:11 +00:00
version = "1.5.1653";
2017-03-07 13:21:38 +00:00
src = fetchFromGitHub {
owner = "psi-plus";
repo = "psi-plus-snapshots";
2021-11-14 09:48:46 +00:00
rev = version;
2024-02-08 04:54:11 +00:00
sha256 = "sha256-9WT2S6ZgIsrHoEAvlWUB078gzCdrPylvSjkkogU5tsU=";
2017-03-07 13:21:38 +00:00
};
2017-03-09 02:17:40 +00:00
cmakeFlags = [
"-DCHAT_TYPE=${chatType}"
"-DENABLE_PLUGINS=${if enablePlugins then "ON" else "OFF"}"
"-DBUILD_PSIMEDIA=${if enablePsiMedia then "ON" else "OFF"}"
2017-03-09 02:17:40 +00:00
];
nativeBuildInputs = [
cmake
qttools
] ++ lib.optionals enablePsiMedia [
pkg-config
];
2017-03-07 13:21:38 +00:00
2017-03-09 01:33:32 +00:00
buildInputs = [
qtbase
qtmultimedia
qtimageformats
qtx11extras
libidn
qca-qt5
libXScrnSaver
hunspell
libsecret
libgcrypt
libotr
html-tidy
libgpg-error
libsignal-protocol-c
2021-05-10 13:09:46 +00:00
usrsctp
] ++ lib.optionals voiceMessagesSupport [
gst_all_1.gst-plugins-base
gst_all_1.gst-plugins-good
] ++ lib.optionals (chatType == "webkit") [
qtwebkit
] ++ lib.optionals (chatType == "webengine") [
qtwebengine
2017-03-09 01:33:32 +00:00
];
2017-03-07 13:21:38 +00:00
preFixup = lib.optionalString voiceMessagesSupport ''
qtWrapperArgs+=(
--prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0"
)
'';
meta = with lib; {
2021-05-10 13:09:46 +00:00
homepage = "https://psi-plus.com";
2021-10-14 19:46:00 +00:00
description = "XMPP (Jabber) client based on Qt5";
mainProgram = "psi-plus";
maintainers = with maintainers; [ orivej unclechu ];
2021-05-10 14:07:42 +00:00
license = licenses.gpl2Only;
2017-03-07 13:21:38 +00:00
platforms = platforms.linux;
};
}