about summary refs log tree commit diff
path: root/pkgs/applications/networking/instant-messengers/spectral/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/networking/instant-messengers/spectral/default.nix')
-rw-r--r--pkgs/applications/networking/instant-messengers/spectral/default.nix41
1 files changed, 16 insertions, 25 deletions
diff --git a/pkgs/applications/networking/instant-messengers/spectral/default.nix b/pkgs/applications/networking/instant-messengers/spectral/default.nix
index 29b314417c76..314a3bb64571 100644
--- a/pkgs/applications/networking/instant-messengers/spectral/default.nix
+++ b/pkgs/applications/networking/instant-messengers/spectral/default.nix
@@ -1,49 +1,40 @@
 { stdenv, fetchgit
-, pkgconfig, makeWrapper
-, qmake, qtbase, qtquickcontrols2, qtmultimedia
+, pkgconfig, wrapQtAppsHook
+, cmake
+, qtbase, qttools, qtquickcontrols2, qtmultimedia, qtkeychain
 , libpulseaudio
 # Not mentioned but seems needed
 , qtgraphicaleffects
 , qtdeclarative
 , qtmacextras
+, olm, cmark
 }:
 
-let
-  # Following "borrowed" from yubikey-manager-qt
-  qmlPath = qmlLib: "${qmlLib}/${qtbase.qtQmlPrefix}";
-
-  inherit (stdenv) lib;
-
-  qml2ImportPath = lib.concatMapStringsSep ":" qmlPath [
-    qtbase.bin qtdeclarative.bin qtquickcontrols2.bin qtgraphicaleffects qtmultimedia
-  ];
-
+let qtkeychain-qt5 = qtkeychain.override {
+  inherit qtbase qttools;
+  withQt5 = true;
+};
 in stdenv.mkDerivation {
   pname = "spectral";
-  version = "2019-03-03";
+  version = "unstable-2019-08-30";
 
   src = fetchgit {
     url = "https://gitlab.com/b0/spectral.git";
-    rev = "0473f25d38a064ee4e18203ec16eeae84fea4866";
-    sha256 = "1n09ginw6g0p42xj3zgxm52dvyyvj5psllv70vx21i50lvkbh9rw";
+    rev = "ee86c948aec5fe72979fc6df97f4a6ef711bdf94";
+    sha256 = "1mqabdkvzq48wki92wm2r79kj8g8m7ganpl47sh60qfsk4bxa8b2";
     fetchSubmodules = true;
   };
 
-  qmakeFlags = [ "CONFIG+=qtquickcompiler" "BUNDLE_FONT=true" ];
-
-  postInstall = ''
-    wrapProgram $out/bin/spectral \
-      --set QML2_IMPORT_PATH "${qml2ImportPath}"
-  '';
+  #qmakeFlags = [ "CONFIG+=qtquickcompiler" "BUNDLE_FONT=true" ];
 
-  nativeBuildInputs = [ pkgconfig qmake makeWrapper ];
-  buildInputs = [ qtbase qtquickcontrols2 qtmultimedia qtgraphicaleffects qtdeclarative ]
+  nativeBuildInputs = [ pkgconfig cmake wrapQtAppsHook ];
+  buildInputs = [ qtbase qtkeychain-qt5 qtquickcontrols2 qtmultimedia qtgraphicaleffects qtdeclarative olm cmark ]
     ++ stdenv.lib.optional stdenv.hostPlatform.isLinux libpulseaudio
     ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin qtmacextras;
 
   meta = with stdenv.lib; {
-    description = "A glossy client for Matrix, written in QtQuick Controls 2 and C++";
-    homepage = https://gitlab.com/b0/spectral;
+    description = "A glossy cross-platform Matrix client.";
+    homepage = "https://gitlab.com/b0/spectral";
     license = licenses.gpl3;
     platforms = with platforms; linux ++ darwin;
     maintainers = with maintainers; [ dtzWill ];