about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/networking/instant-messengers/psi-plus/default.nix
blob: c180cdb4e01f032a969f8882004d9e52f862de53 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
{ lib, mkDerivation, fetchFromGitHub, cmake
, qtbase, qtmultimedia, qtx11extras, qttools, qtwebengine
, libidn, qca-qt5, libXScrnSaver, hunspell
, libsecret, libgcrypt, libotr, html-tidy, libgpgerror, libsignal-protocol-c
, usrsctp

# Voice messages
, voiceMessagesSupport ? true
, gst_all_1
}:

mkDerivation rec {
  pname = "psi-plus";
  version = "1.5.1520";

  src = fetchFromGitHub {
    owner = "psi-plus";
    repo = "psi-plus-snapshots";
    rev = version;
    sha256 = "0cj811qv0n8xck2qrnps2ybzrpvyjqz7nxkyccpaivq6zxj6mc12";
  };

  cmakeFlags = [
    "-DENABLE_PLUGINS=ON"
  ];

  nativeBuildInputs = [ cmake qttools ];

  buildInputs = [
    qtbase qtmultimedia qtx11extras qtwebengine
    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
  ];

  preFixup = lib.optionalString voiceMessagesSupport ''
    qtWrapperArgs+=(
      --prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0"
    )
  '';

  meta = with lib; {
    homepage = "https://psi-plus.com";
    description = "XMPP (Jabber) client";
    maintainers = with maintainers; [ orivej misuzu ];
    license = licenses.gpl2Only;
    platforms = platforms.linux;
  };
}