diff options
author | Peter Hoeg <peter@hoeg.com> | 2019-04-28 21:51:48 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-28 21:51:48 +0800 |
commit | 78bcc59d595ab555daf5e62ff66cc141a5120632 (patch) | |
tree | 2c255d2ba53005e05fd626552e28aade4ecced16 /pkgs/applications | |
parent | 2a48354da371875a2ce5ba9daf0feea11941e42f (diff) | |
parent | 05dfa99d1d899fa288253c9e4afd7897c286d7fa (diff) |
Merge pull request #59256 from peterhoeg/u/quaternion
quaternion-git: init at 0.0.9.4-rc3
Diffstat (limited to 'pkgs/applications')
-rw-r--r-- | pkgs/applications/networking/instant-messengers/matrique/default.nix | 55 | ||||
-rw-r--r-- | pkgs/applications/networking/instant-messengers/quaternion/default.nix | 60 |
2 files changed, 33 insertions, 82 deletions
diff --git a/pkgs/applications/networking/instant-messengers/matrique/default.nix b/pkgs/applications/networking/instant-messengers/matrique/default.nix deleted file mode 100644 index 91ba8e7175ce7..0000000000000 --- a/pkgs/applications/networking/instant-messengers/matrique/default.nix +++ /dev/null @@ -1,55 +0,0 @@ -{ stdenv, fetchFromGitLab, fetchFromGitHub, qmake -, qtquickcontrols2, qtmultimedia, qtgraphicaleffects -, libqmatrixclient -}: - -let - - libqmatrixclient_git = libqmatrixclient.overrideDerivation (oldAttrs: { - name = "libqmatrixclient-git-for-matrique"; - src = fetchFromGitHub { - owner = "QMatrixClient"; - repo = "libqmatrixclient"; - rev = "d9ff200f"; - sha256 = "0qxkffg1499wnn8rbndq6z51sz6hiij2pkp40cvs530sl0zg0c69"; - }; - }); - - SortFilterProxyModel = fetchFromGitLab { - owner = "b0"; - repo = "SortFilterProxyModel"; - rev = "3c2c125c"; - sha256 = "1494dvq7kiq0ymf5f9hr47pw80zv3m3dncnaw1pnzs7mhkf2s5fr"; - }; - -in stdenv.mkDerivation rec { - name = "matrique-${version}"; - version = "250"; - - src = fetchFromGitLab { - owner = "b0"; - repo = "matrique"; - rev = version; - sha256 = "0l7ag2q3l8ixczwc43igvkkl81g5s5j032gzizmgpzb1bjpdgry7"; - }; - - postPatch = '' - rm -r include/* - ln -sf ${libqmatrixclient_git.src} include/libqmatrixclient - ln -sf ${SortFilterProxyModel} include/SortFilterProxyModel - ''; - - nativeBuildInputs = [ qmake ]; - buildInputs = [ - qtquickcontrols2 qtmultimedia qtgraphicaleffects - libqmatrixclient_git - ]; - - meta = with stdenv.lib; { - inherit (src.meta) homepage; - description = "A glossy client for Matrix"; - maintainers = with maintainers; [ fpletz ]; - license = licenses.gpl3; - platforms = platforms.linux; - }; -} diff --git a/pkgs/applications/networking/instant-messengers/quaternion/default.nix b/pkgs/applications/networking/instant-messengers/quaternion/default.nix index 55b24f71fb64a..5acf71dbcb63e 100644 --- a/pkgs/applications/networking/instant-messengers/quaternion/default.nix +++ b/pkgs/applications/networking/instant-messengers/quaternion/default.nix @@ -1,36 +1,42 @@ { stdenv, lib, fetchFromGitHub, qtbase, qtquickcontrols, cmake -, qttools, libqmatrixclient }: +, qttools, qtmultimedia +, libqmatrixclient_0_4, libqmatrixclient_0_5 }: -stdenv.mkDerivation rec { - name = "quaternion-${version}"; - version = "0.0.9.3"; +let + generic = version: sha256: prefix: library: stdenv.mkDerivation rec { + name = "quaternion-${version}"; - src = fetchFromGitHub { - owner = "QMatrixClient"; - repo = "Quaternion"; - rev = "v${version}"; - sha256 = "1hr9zqf301rg583n9jv256vzj7y57d8qgayk7c723bfknf1s6hh3"; - }; + src = fetchFromGitHub { + owner = "QMatrixClient"; + repo = "Quaternion"; + rev = "${prefix}${version}"; + inherit sha256; + }; - buildInputs = [ qtbase qtquickcontrols qttools libqmatrixclient ]; + buildInputs = [ qtbase qtmultimedia qtquickcontrols qttools library ]; - nativeBuildInputs = [ cmake ]; + 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" - ''; + 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; + 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; + }; }; + +in rec { + quaternion = generic "0.0.9.3" "1hr9zqf301rg583n9jv256vzj7y57d8qgayk7c723bfknf1s6hh3" "v" libqmatrixclient_0_4; + quaternion-git = generic "0.0.9.4-rc3" "1fc3ya9fr3zw1cx7565s2rswzry98avslrryvdi0qa9yn0m3sw7p" "" libqmatrixclient_0_5; } |