about summary refs log tree commit diff
path: root/pkgs/aszlig/psi/default.nix
diff options
context:
space:
mode:
authoraszlig <aszlig@nix.build>2019-06-21 04:28:50 +0200
committeraszlig <aszlig@nix.build>2019-06-21 04:46:26 +0200
commitf33d5617c08f8378433d00f18e9f0bb7136ca5ad (patch)
tree25aa6a7d966173a794e79f217c39a0d19d49f196 /pkgs/aszlig/psi/default.nix
parentad7db89ba40a65e5a5a39b333ae3e3ee19b325c0 (diff)
pkgs/aszlig: Add custom Psi XMPP client
This is from the current 2.0 development version and has most of my own
configuration preferences built-in.

Right now, the theming is pretty much a work in progress and the chat
input currently shows black text on dark grey background, which is quite
a nuisance to use.

Another thing that's currently not working (or just for a very short
amount of time) are window manager urgency hints.

Nevertheless however, I'm already using it as my main XMPP client
despite these issues.

Signed-off-by: aszlig <aszlig@nix.build>
Diffstat (limited to 'pkgs/aszlig/psi/default.nix')
-rw-r--r--pkgs/aszlig/psi/default.nix80
1 files changed, 80 insertions, 0 deletions
diff --git a/pkgs/aszlig/psi/default.nix b/pkgs/aszlig/psi/default.nix
new file mode 100644
index 00000000..35e51b32
--- /dev/null
+++ b/pkgs/aszlig/psi/default.nix
@@ -0,0 +1,80 @@
+{ stdenv, lib, fetchFromGitHub, cmake, makeWrapper
+, hunspell, libgcrypt, libgpgerror, libidn, libotr, libsForQt5
+, libsignal-protocol-c, libtidy, qt5
+
+, substituteAll
+
+, jid ? "something@example.org"
+, resource ? "psi-aszlig"
+}:
+
+let
+  qdarkstyle = fetchFromGitHub {
+    owner = "ColinDuquesnoy";
+    repo = "QDarkStyleSheet";
+    rev = "c92d0c4c996e3e859134492e0f9f7f74bd0e12cd";
+    sha256 = "1qrmp3ibvgzwh2v1qfrfh8xiwvj0kbhj1bm17bjx7zpmnb8byz3m";
+  };
+
+in stdenv.mkDerivation rec {
+  name = "psi-${version}";
+  version = "2.0git20190613aszlig";
+
+  src = fetchFromGitHub {
+    owner = "psi-im";
+    repo = "psi";
+    rev = "b61c0c21d7a370b63e091c1205aab0c504106634";
+    sha256 = "00bnxhv8pgyhq0b7rsq59a6agb5lv8ali3wcna6hgfbajs3jjzbx";
+    fetchSubmodules = true;
+  };
+
+  plugins = fetchFromGitHub {
+    owner = "psi-im";
+    repo = "plugins";
+    rev = "e29fbe14558342060e5addd311e143e65dbfd722";
+    sha256 = "09bii2zv9vgfyiqqajc5ziq8yhybyhiiwywl18vfj7inz82p40d2";
+  };
+
+  patches = [
+    ./disable-xep-0232.patch
+    ./darkstyle.patch
+    (substituteAll {
+      src = ./config.patch;
+      inherit jid resource;
+    })
+  ];
+
+  preConfigure = ''
+    cp --no-preserve=all -rt src/plugins "$plugins"/*
+  '';
+
+  cmakeFlags = [
+    "-DENABLE_PLUGINS=ON" "-DUSE_KEYCHAIN=OFF" "-DPSI_VERSION=${version}"
+    "-DQDARKSTYLE_PATH=${qdarkstyle}"
+  ];
+
+  enableParallelBuilding = true;
+  nativeBuildInputs = [ cmake makeWrapper ];
+  buildInputs = [
+    hunspell
+    libgcrypt
+    libgpgerror
+    libidn
+    libotr
+    libsForQt5.qca-qt5
+    libsignal-protocol-c
+    libtidy
+    qt5.qtbase
+    qt5.qtmultimedia
+    qt5.qtwebengine
+    qt5.qtx11extras
+  ];
+
+  postInstall = let
+    inherit (qt5.qtbase) qtPluginPrefix;
+    qtPlugins = "${qt5.qtbase}/${qtPluginPrefix}";
+  in ''
+    wrapProgram "$out/bin/psi" \
+      --suffix QT_PLUGIN_PATH : ${lib.escapeShellArg qtPlugins}
+  '';
+}