Skip to content

Commit

Permalink
tensor: init at (post) 0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
peterhoeg committed Apr 14, 2017
1 parent 48b5b77 commit 862fc1b
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 0 deletions.
55 changes: 55 additions & 0 deletions pkgs/applications/networking/instant-messengers/tensor/default.nix
@@ -0,0 +1,55 @@
{ stdenv, fetchgit, qtbase, qtquickcontrols, qmakeHook, makeQtWrapper, makeDesktopItem }:

let
rev = "f3f3056d770d7fb4a21c610cee7936ee900569f5";

in stdenv.mkDerivation rec {
name = "tensor-git-${stdenv.lib.strings.substring 0 8 rev}";

This comment has been minimized.

Copy link
@joachifm

joachifm Apr 14, 2017

Contributor

Note that revisions are useless as version identifiers, as old < new doesn't necessarily hold. The usual work-around is to use the year-month-day of the rev instead.

This comment has been minimized.

Copy link
@peterhoeg

peterhoeg Apr 15, 2017

Author Member

Thanks @joachifm, fixed in b7d2ffe.


src = fetchgit {
url = "https://github.com/davidar/tensor.git";
fetchSubmodules = true;
inherit rev;
sha256 = "19in8c7a2hxsx2c4lj540w5c3pn1882645m21l91mcriynqr67k9";
};

parallelBuilding = true;

This comment has been minimized.

Copy link
@joachifm

joachifm Apr 14, 2017

Contributor

I think you intended enableParallelBuilding

This comment has been minimized.

Copy link
@peterhoeg

peterhoeg Apr 15, 2017

Author Member

Indeed, fixed as well.


buildInputs = [ qtbase qtquickcontrols ];
nativeBuildInputs = [ qmakeHook makeQtWrapper ];

desktopItem = makeDesktopItem {
name = "tensor";
exec = "@bin@";
icon = "tensor.png";
comment = meta.description;
desktopName = "Tensor Matrix Client";
genericName = meta.description;
categories = "Chat;Utility";
mimeType = "text/xml";
};

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 ];
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Expand Up @@ -652,6 +652,8 @@ with pkgs;

blink = callPackage ../applications/networking/instant-messengers/blink { };

tensor = libsForQt5.callPackage ../applications/networking/instant-messengers/tensor { };

blink1-tool = callPackage ../tools/misc/blink1-tool { };

blitz = callPackage ../development/libraries/blitz {
Expand Down

0 comments on commit 862fc1b

Please sign in to comment.