nixpkgs-suyu/pkgs/applications/networking/instant-messengers/quaternion/default.nix
2018-12-13 17:38:14 -05:00

36 lines
1.1 KiB
Nix

{ stdenv, lib, fetchFromGitHub, qtbase, qtquickcontrols, cmake
, qttools, libqmatrixclient }:
stdenv.mkDerivation rec {
name = "quaternion-${version}";
version = "0.0.9.3";
src = fetchFromGitHub {
owner = "QMatrixClient";
repo = "Quaternion";
rev = "v${version}";
sha256 = "1hr9zqf301rg583n9jv256vzj7y57d8qgayk7c723bfknf1s6hh3";
};
buildInputs = [ qtbase qtquickcontrols qttools libqmatrixclient ];
nativeBuildInputs = [ cmake ];
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"
'';
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;
};
}