diff options
author | Viacheslav Lotsmanov <lotsmanov89@gmail.com> | 2021-07-15 19:25:38 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-15 18:25:38 +0200 |
commit | 53ca0b16646ae358e37c396f6c5f8955977002c1 (patch) | |
tree | b0673e6ec3c4065defd46af8d921ca182394ba76 /pkgs/applications/networking/instant-messengers/psi-plus | |
parent | a0fe575c2ccd9d24421c10f4880f22c91e030ec0 (diff) | |
download | nixpkgs-53ca0b16646ae358e37c396f6c5f8955977002c1.tar nixpkgs-53ca0b16646ae358e37c396f6c5f8955977002c1.tar.gz nixpkgs-53ca0b16646ae358e37c396f6c5f8955977002c1.tar.bz2 nixpkgs-53ca0b16646ae358e37c396f6c5f8955977002c1.tar.lz nixpkgs-53ca0b16646ae358e37c396f6c5f8955977002c1.tar.xz nixpkgs-53ca0b16646ae358e37c396f6c5f8955977002c1.tar.zst nixpkgs-53ca0b16646ae358e37c396f6c5f8955977002c1.zip |
psi-plus: add more build options (#129710)
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
Diffstat (limited to 'pkgs/applications/networking/instant-messengers/psi-plus')
-rw-r--r-- | pkgs/applications/networking/instant-messengers/psi-plus/default.nix | 72 |
1 files changed, 62 insertions, 10 deletions
diff --git a/pkgs/applications/networking/instant-messengers/psi-plus/default.nix b/pkgs/applications/networking/instant-messengers/psi-plus/default.nix index c9b4c7e5292..01a8a71f032 100644 --- a/pkgs/applications/networking/instant-messengers/psi-plus/default.nix +++ b/pkgs/applications/networking/instant-messengers/psi-plus/default.nix @@ -1,14 +1,45 @@ -{ lib, mkDerivation, fetchFromGitHub, cmake -, qtbase, qtmultimedia, qtx11extras, qttools, qtwebengine -, libidn, qca-qt5, libXScrnSaver, hunspell -, libsecret, libgcrypt, libotr, html-tidy, libgpgerror, libsignal-protocol-c +{ lib +, mkDerivation +, fetchFromGitHub +, cmake +, qtbase +, qtmultimedia +, qtx11extras +, qttools +, libidn +, qca-qt5 +, libXScrnSaver +, hunspell +, libsecret +, libgcrypt +, libotr +, html-tidy +, libgpgerror +, libsignal-protocol-c , usrsctp -# Voice messages +, chatType ? "basic" # See the assertion below for available options +, qtwebkit +, qtwebengine + +, enablePlugins ? true + + # Voice messages , voiceMessagesSupport ? true , gst_all_1 + +, enablePsiMedia ? false +, pkg-config }: +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; + mkDerivation rec { pname = "psi-plus"; version = "1.5.1549"; @@ -21,19 +52,40 @@ mkDerivation rec { }; cmakeFlags = [ - "-DENABLE_PLUGINS=ON" + "-DCHAT_TYPE=${chatType}" + "-DENABLE_PLUGINS=${if enablePlugins then "ON" else "OFF"}" + "-DBUILD_PSIMEDIA=${if enablePsiMedia then "ON" else "OFF"}" ]; - nativeBuildInputs = [ cmake qttools ]; + nativeBuildInputs = [ + cmake + qttools + ] ++ lib.optionals enablePsiMedia [ + pkg-config + ]; buildInputs = [ - qtbase qtmultimedia qtx11extras qtwebengine - libidn qca-qt5 libXScrnSaver hunspell - libsecret libgcrypt libotr html-tidy libgpgerror libsignal-protocol-c + qtbase + qtmultimedia + qtx11extras + libidn + qca-qt5 + libXScrnSaver + hunspell + libsecret + libgcrypt + libotr + html-tidy + libgpgerror + libsignal-protocol-c 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 ]; preFixup = lib.optionalString voiceMessagesSupport '' |