3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/networking/instant-messengers/quaternion/default.nix

44 lines
1.3 KiB
Nix
Raw Normal View History

2019-04-29 13:52:43 +01:00
{ stdenv, lib, fetchFromGitHub, cmake
, qtbase, qtquickcontrols, qtkeychain, qtmultimedia, qttools
, libqmatrixclient_0_5 }:
2017-11-26 15:32:18 +00:00
2019-04-10 08:07:01 +01:00
let
generic = version: sha256: prefix: library: stdenv.mkDerivation rec {
name = "quaternion-${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
2019-04-29 13:52:43 +01:00
buildInputs = [ qtbase qtmultimedia qtquickcontrols qtkeychain qttools library ];
2017-11-26 15:32:18 +00:00
2019-04-10 08:07:01 +01:00
nativeBuildInputs = [ cmake ];
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";
homepage = https://matrix.org/docs/projects/client/quaternion.html;
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 {
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
}