2018-08-18 13:33:56 +02:00
|
|
|
{ stdenv, lib, fetchFromGitHub, fetchpatch, qtbase, qtquickcontrols, cmake, libqmatrixclient }:
|
2017-11-26 16:32:18 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "quaternion-${version}";
|
2018-07-12 19:33:13 +02:00
|
|
|
version = "0.0.9.2";
|
2017-11-26 16:32:18 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "QMatrixClient";
|
|
|
|
repo = "Quaternion";
|
|
|
|
rev = "v${version}";
|
2018-07-12 19:33:13 +02:00
|
|
|
sha256 = "0zrr4khbbdf5ziq65gi0cb1yb1d0y5rv18wld22w1x96f7fkmrib";
|
2017-04-16 10:52:51 +02:00
|
|
|
};
|
|
|
|
|
2018-08-18 13:33:56 +02:00
|
|
|
buildInputs = [ qtbase qtquickcontrols ];
|
2017-11-26 16:32:18 +01:00
|
|
|
|
2017-05-17 21:26:11 +02:00
|
|
|
nativeBuildInputs = [ cmake ];
|
2017-04-16 10:52:51 +02:00
|
|
|
|
2018-08-18 13:33:56 +02:00
|
|
|
patches = [
|
|
|
|
# https://github.com/QMatrixClient/Quaternion/pull/400
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/QMatrixClient/Quaternion/commit/6cb29834efc343dc2bcf1db62cfad2dc4c121c54.patch";
|
|
|
|
sha256 = "0n7mgzzrvx9sa657rfb99i0mjh1k0sn5br344mknqy3wgqdr7s3x";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2018-04-30 11:22:20 +02:00
|
|
|
# libqmatrixclient is now compiled as a dynamic library but quarternion cannot use it yet
|
|
|
|
# https://github.com/QMatrixClient/Quaternion/issues/239
|
2017-11-26 16:32:18 +01:00
|
|
|
postPatch = ''
|
|
|
|
rm -rf lib
|
|
|
|
ln -s ${libqmatrixclient.src} lib
|
|
|
|
'';
|
2017-04-16 10:52:51 +02:00
|
|
|
|
2018-08-18 13:33:56 +02:00
|
|
|
postInstall = if stdenv.isDarwin then ''
|
|
|
|
mkdir -p $out/Applications
|
|
|
|
mv $out/bin/quaternion.app $out/Applications
|
|
|
|
rmdir $out/bin || :
|
|
|
|
'' else ''
|
2017-04-16 10:52:51 +02:00
|
|
|
substituteInPlace $out/share/applications/quaternion.desktop \
|
|
|
|
--replace 'Exec=quaternion' "Exec=$out/bin/quaternion"
|
|
|
|
'';
|
|
|
|
|
2017-05-17 21:26:11 +02:00
|
|
|
meta = with lib; {
|
2017-04-16 10:52:51 +02:00
|
|
|
description = "Cross-platform desktop IM client for the Matrix protocol";
|
2017-07-12 17:50:04 +02:00
|
|
|
homepage = https://matrix.org/docs/projects/client/quaternion.html;
|
|
|
|
license = licenses.gpl3;
|
2017-04-16 10:52:51 +02:00
|
|
|
maintainers = with maintainers; [ peterhoeg ];
|
|
|
|
inherit (qtbase.meta) platforms;
|
|
|
|
inherit version;
|
|
|
|
};
|
|
|
|
}
|