2019-08-20 08:50:35 +01:00
|
|
|
{ mkDerivation, stdenv, lib, fetchFromGitHub, cmake
|
2019-04-29 13:52:43 +01:00
|
|
|
, qtbase, qtquickcontrols, qtkeychain, qtmultimedia, qttools
|
2020-01-07 20:17:12 +00:00
|
|
|
, libqmatrixclient_0_5
|
2020-03-03 04:44:35 +00:00
|
|
|
, libsecret
|
2020-01-07 20:17:12 +00:00
|
|
|
}:
|
2017-11-26 15:32:18 +00:00
|
|
|
|
2019-04-10 08:07:01 +01:00
|
|
|
let
|
2019-08-13 22:52:01 +01:00
|
|
|
generic = version: sha256: prefix: library: mkDerivation {
|
2019-08-20 08:50:35 +01:00
|
|
|
pname = "quaternion";
|
|
|
|
inherit version;
|
2017-11-26 15:32:18 +00:00
|
|
|
|
2019-04-10 08:07:01 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "QMatrixClient";
|
|
|
|
repo = "Quaternion";
|
|
|
|
rev = "${prefix}${version}";
|
|
|
|
inherit sha256;
|
|
|
|
};
|
2017-04-16 09:52:51 +01:00
|
|
|
|
2020-03-03 04:44:35 +00:00
|
|
|
buildInputs = [ qtbase qtmultimedia qtquickcontrols qtkeychain library libsecret ];
|
2017-11-26 15:32:18 +00:00
|
|
|
|
2019-08-20 08:50:35 +01:00
|
|
|
nativeBuildInputs = [ cmake qttools ];
|
2017-04-16 09:52:51 +01:00
|
|
|
|
2019-04-10 08:07:01 +01:00
|
|
|
postInstall = if stdenv.isDarwin then ''
|
|
|
|
mkdir -p $out/Applications
|
|
|
|
mv $out/bin/quaternion.app $out/Applications
|
|
|
|
rmdir $out/bin || :
|
|
|
|
'' else ''
|
|
|
|
substituteInPlace $out/share/applications/quaternion.desktop \
|
|
|
|
--replace 'Exec=quaternion' "Exec=$out/bin/quaternion"
|
|
|
|
'';
|
2017-04-16 09:52:51 +01:00
|
|
|
|
2019-04-10 08:07:01 +01:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Cross-platform desktop IM client for the Matrix protocol";
|
2019-08-20 08:50:35 +01:00
|
|
|
homepage = "https://matrix.org/docs/projects/client/quaternion.html";
|
2019-04-10 08:07:01 +01:00
|
|
|
license = licenses.gpl3;
|
|
|
|
maintainers = with maintainers; [ peterhoeg ];
|
|
|
|
inherit (qtbase.meta) platforms;
|
|
|
|
inherit version;
|
|
|
|
};
|
2017-04-16 09:52:51 +01:00
|
|
|
};
|
2019-04-10 08:07:01 +01:00
|
|
|
|
|
|
|
in rec {
|
2019-05-29 03:08:12 +01:00
|
|
|
quaternion = generic "0.0.9.4c" "12mkwiqqbi4774kwl7gha72jyf0jf547acy6rw8ry249zl4lja54" "" libqmatrixclient_0_5;
|
|
|
|
|
2019-04-29 13:52:43 +01:00
|
|
|
quaternion-git = quaternion;
|
2017-04-16 09:52:51 +01:00
|
|
|
}
|