nixpkgs/pkgs/applications/networking/instant-messengers/spectral/default.nix

52 lines
1.5 KiB
Nix
Raw Normal View History

{ stdenv, fetchgit
, pkgconfig, makeWrapper
, qmake, qtbase, qtquickcontrols2, qtmultimedia
, libpulseaudio
# Not mentioned but seems needed
, qtgraphicaleffects
, qtdeclarative
2019-04-25 04:02:55 +01:00
, qtmacextras
}:
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 ]
2019-04-25 04:02:55 +01:00
++ 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;
license = licenses.gpl3;
platforms = with platforms; linux ++ darwin;
maintainers = with maintainers; [ dtzWill ];
};
}