nixpkgs/pkgs/applications/networking/instant-messengers/spectral/default.nix
Will Dietz ad3d9c0204 spectral: 2018-09-24 -> 2019-03-03
Recent redesign, features, fixes.
2019-03-03 22:15:59 -06:00

50 lines
1.4 KiB
Nix

{ stdenv, fetchgit
, pkgconfig, makeWrapper
, qmake, qtbase, qtquickcontrols2, qtmultimedia
, libpulseaudio
# Not mentioned but seems needed
, qtgraphicaleffects
, qtdeclarative
}:
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
];
in stdenv.mkDerivation rec {
pname = "spectral";
version = "2019-03-03";
src = fetchgit {
url = "https://gitlab.com/b0/spectral.git";
rev = "0473f25d38a064ee4e18203ec16eeae84fea4866";
sha256 = "1n09ginw6g0p42xj3zgxm52dvyyvj5psllv70vx21i50lvkbh9rw";
fetchSubmodules = true;
};
qmakeFlags = [ "CONFIG+=qtquickcompiler" "BUNDLE_FONT=true" ];
postInstall = ''
wrapProgram $out/bin/spectral \
--set QML2_IMPORT_PATH "${qml2ImportPath}"
'';
nativeBuildInputs = [ pkgconfig qmake makeWrapper ];
buildInputs = [ qtbase qtquickcontrols2 qtmultimedia qtgraphicaleffects qtdeclarative ]
++ stdenv.lib.optional stdenv.hostPlatform.isLinux libpulseaudio;
meta = with stdenv.lib; {
description = "A glossy client for Matrix, written in QtQuick Controls 2 and C++";
homepage = https://gitlab.com/b0/spectral;
license = licenses.gpl3;
platforms = with platforms; linux ++ darwin;
maintainers = with maintainers; [ dtzWill ];
};
}