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

56 lines
1.6 KiB
Nix
Raw Normal View History

2017-06-02 15:40:19 +00:00
{ stdenv, fetchgit, qtbase, qtquickcontrols, qmake, makeQtWrapper, makeDesktopItem }:
2017-04-14 11:04:55 +00:00
stdenv.mkDerivation rec {
name = "tensor-git-${version}";
version = "2017-02-21";
2017-04-14 11:04:55 +00:00
src = fetchgit {
url = "https://github.com/davidar/tensor.git";
rev = "f3f3056d770d7fb4a21c610cee7936ee900569f5";
sha256 = "19in8c7a2hxsx2c4lj540w5c3pn1882645m21l91mcriynqr67k9";
2017-04-14 11:04:55 +00:00
fetchSubmodules = true;
};
enableParallelBuilding = true;
2017-04-14 11:04:55 +00:00
buildInputs = [ qtbase qtquickcontrols ];
2017-06-02 15:40:19 +00:00
nativeBuildInputs = [ qmake makeQtWrapper ];
2017-04-14 11:04:55 +00:00
desktopItem = makeDesktopItem {
name = "tensor";
exec = "@bin@";
icon = "tensor.png";
comment = meta.description;
2017-04-14 11:04:55 +00:00
desktopName = "Tensor Matrix Client";
genericName = meta.description;
categories = "Chat;Utility";
mimeType = "application/x-chat";
2017-04-14 11:04:55 +00:00
};
installPhase = ''
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
wrapQtProgram $out/bin/tensor
substituteInPlace $out/share/applications/tensor.desktop \
--subst-var-by bin $out/bin/tensor
runHook postInstall
'';
meta = with stdenv.lib; {
homepage = https://matrix.org/docs/projects/client/tensor.html;
description = "Cross-platform Qt5/QML-based Matrix client";
license = licenses.gpl3;
maintainers = with maintainers; [ peterhoeg ];
inherit (qtbase.meta) platforms;
inherit version;
2017-04-14 11:04:55 +00:00
};
}