2021-11-10 21:21:47 +00:00
|
|
|
{ mkDerivation
|
|
|
|
, lib
|
|
|
|
, stdenv
|
|
|
|
, fetchgit
|
|
|
|
, qtbase
|
|
|
|
, qtquickcontrols
|
|
|
|
, qmake
|
|
|
|
, makeDesktopItem
|
|
|
|
}:
|
2017-04-14 12:04:55 +01:00
|
|
|
|
2017-11-26 15:32:01 +00:00
|
|
|
# we now have libqmatrixclient so a future version of tensor that supports it
|
|
|
|
# should use that
|
|
|
|
|
2020-04-07 21:34:28 +01:00
|
|
|
mkDerivation rec {
|
2021-11-10 21:21:47 +00:00
|
|
|
pname = "tensor";
|
|
|
|
version = "unstable-2017-02-21";
|
2017-04-14 12:04:55 +01:00
|
|
|
|
|
|
|
src = fetchgit {
|
2021-11-10 21:21:47 +00:00
|
|
|
url = "https://github.com/davidar/tensor.git";
|
|
|
|
rev = "f3f3056d770d7fb4a21c610cee7936ee900569f5";
|
|
|
|
sha256 = "19in8c7a2hxsx2c4lj540w5c3pn1882645m21l91mcriynqr67k9";
|
2017-04-14 12:04:55 +01:00
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ qtbase qtquickcontrols ];
|
2017-05-17 20:26:11 +01:00
|
|
|
nativeBuildInputs = [ qmake ];
|
2017-04-14 12:04:55 +01:00
|
|
|
|
|
|
|
desktopItem = makeDesktopItem {
|
2021-11-10 21:21:47 +00:00
|
|
|
name = "tensor";
|
|
|
|
exec = "@bin@";
|
|
|
|
icon = "tensor.png";
|
|
|
|
comment = meta.description;
|
2017-04-14 12:04:55 +01:00
|
|
|
desktopName = "Tensor Matrix Client";
|
|
|
|
genericName = meta.description;
|
2021-11-10 21:21:47 +00:00
|
|
|
categories = "Chat;Utility";
|
|
|
|
mimeType = "application/x-chat";
|
2017-04-14 12:04:55 +01:00
|
|
|
};
|
|
|
|
|
2021-05-18 18:33:46 +01:00
|
|
|
installPhase = if stdenv.isDarwin then ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
mkdir -p $out/Applications
|
|
|
|
cp -r tensor.app $out/Applications/tensor.app
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'' else ''
|
2017-04-14 12:04:55 +01:00
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
install -Dm755 tensor $out/bin/tensor
|
|
|
|
install -Dm644 client/logo.png \
|
|
|
|
$out/share/icons/hicolor/512x512/apps/tensor.png
|
|
|
|
install -Dm644 ${desktopItem}/share/applications/tensor.desktop \
|
|
|
|
$out/share/applications/tensor.desktop
|
|
|
|
|
|
|
|
substituteInPlace $out/share/applications/tensor.desktop \
|
|
|
|
--subst-var-by bin $out/bin/tensor
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://matrix.org/docs/projects/client/tensor.html";
|
2017-04-14 12:04:55 +01:00
|
|
|
description = "Cross-platform Qt5/QML-based Matrix client";
|
|
|
|
license = licenses.gpl3;
|
|
|
|
maintainers = with maintainers; [ peterhoeg ];
|
2017-04-15 09:02:30 +01:00
|
|
|
inherit (qtbase.meta) platforms;
|
2017-04-14 12:04:55 +01:00
|
|
|
};
|
|
|
|
}
|