2018-09-25 21:24:24 +02:00
|
|
|
{ stdenv, fetchgit
|
2019-03-04 05:10:42 +01:00
|
|
|
, pkgconfig, makeWrapper
|
2018-09-25 21:24:24 +02:00
|
|
|
, qmake, qtbase, qtquickcontrols2, qtmultimedia
|
|
|
|
, libpulseaudio
|
|
|
|
# Not mentioned but seems needed
|
|
|
|
, qtgraphicaleffects
|
2019-03-04 05:10:42 +01:00
|
|
|
, qtdeclarative
|
2019-04-25 05:02:55 +02:00
|
|
|
, qtmacextras
|
2018-09-25 21:24:24 +02:00
|
|
|
}:
|
|
|
|
|
2019-03-04 05:10:42 +01:00
|
|
|
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";
|
2018-09-25 21:24:24 +02:00
|
|
|
|
|
|
|
src = fetchgit {
|
|
|
|
url = "https://gitlab.com/b0/spectral.git";
|
2019-03-04 05:10:42 +01:00
|
|
|
rev = "0473f25d38a064ee4e18203ec16eeae84fea4866";
|
|
|
|
sha256 = "1n09ginw6g0p42xj3zgxm52dvyyvj5psllv70vx21i50lvkbh9rw";
|
2018-09-25 21:24:24 +02:00
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
|
2019-03-04 05:10:42 +01:00
|
|
|
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 05:02:55 +02:00
|
|
|
++ stdenv.lib.optional stdenv.hostPlatform.isLinux libpulseaudio
|
|
|
|
++ stdenv.lib.optional stdenv.hostPlatform.isDarwin qtmacextras;
|
2018-09-25 21:24:24 +02:00
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|