From 734eba699cc0b2fb34240ee1ff8b50b3fbedadaa Mon Sep 17 00:00:00 2001 From: Peter Hoeg Date: Wed, 10 Apr 2019 15:06:47 +0800 Subject: [PATCH 1/3] libqmatrixclient: init at 0.5.1.2 --- .../libraries/libqmatrixclient/default.nix | 46 +++++++++++-------- pkgs/top-level/all-packages.nix | 5 +- 2 files changed, 30 insertions(+), 21 deletions(-) diff --git a/pkgs/development/libraries/libqmatrixclient/default.nix b/pkgs/development/libraries/libqmatrixclient/default.nix index 160ce9fcabf6..a81e4ff07803 100644 --- a/pkgs/development/libraries/libqmatrixclient/default.nix +++ b/pkgs/development/libraries/libqmatrixclient/default.nix @@ -1,26 +1,32 @@ { stdenv, fetchFromGitHub, cmake -, qtbase }: +, qtbase, qtmultimedia }: -stdenv.mkDerivation rec { - name = "libqmatrixclient-${version}"; - version = "0.4.2.1"; +let + generic = version: sha256: prefix: stdenv.mkDerivation rec { + name = "libqmatrixclient-${version}"; - src = fetchFromGitHub { - owner = "QMatrixClient"; - repo = "libqmatrixclient"; - rev = "v${version}"; - sha256 = "056hvp2m74wx72yd8vai18siddj9l8bhrvrkc4ia4cwjsqw02kid"; + src = fetchFromGitHub { + owner = "QMatrixClient"; + repo = "libqmatrixclient"; + rev = "${prefix}${version}"; + inherit sha256; + }; + + buildInputs = [ qtbase qtmultimedia ]; + + nativeBuildInputs = [ cmake ]; + + meta = with stdenv.lib; { + description= "A Qt5 library to write cross-platfrom clients for Matrix"; + homepage = https://matrix.org/docs/projects/sdk/libqmatrixclient.html; + license = licenses.lgpl21; + platforms = with platforms; linux ++ darwin; + maintainers = with maintainers; [ peterhoeg ]; + }; }; - buildInputs = [ qtbase ]; - - nativeBuildInputs = [ cmake ]; - - meta = with stdenv.lib; { - description= "A Qt5 library to write cross-platfrom clients for Matrix"; - homepage = https://matrix.org/docs/projects/sdk/libqmatrixclient.html; - license = licenses.lgpl21; - platforms = with platforms; linux ++ darwin; - maintainers = with maintainers; [ peterhoeg ]; - }; +in rec { + libqmatrixclient_0_4 = generic "0.4.2.1" "056hvp2m74wx72yd8vai18siddj9l8bhrvrkc4ia4cwjsqw02kid" "v"; + libqmatrixclient_0_5 = generic "0.5.1.2" "0vvpm1vlqfvhgfvavifrj4998g8v33hp5xjf0n8zfsmg4lxlnfg1" ""; + libqmatrixclient = libqmatrixclient_0_4; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index aba790b9273a..d744f9866f13 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -987,7 +987,10 @@ in charles4 ; - libqmatrixclient = libsForQt5.callPackage ../development/libraries/libqmatrixclient { }; + inherit (libsForQt5.callPackage ../development/libraries/libqmatrixclient { }) + libqmatrixclient_0_4 + libqmatrixclient_0_5 + libqmatrixclient; quaternion = libsForQt5.callPackage ../applications/networking/instant-messengers/quaternion { }; From 3bf5c2a6e08be1947aace1f4c74a67c88dd40871 Mon Sep 17 00:00:00 2001 From: Peter Hoeg Date: Wed, 10 Apr 2019 15:07:01 +0800 Subject: [PATCH 2/3] quaternion-git: init at 0.0.9.4-rc3 --- .../instant-messengers/quaternion/default.nix | 66 ++++++++++--------- pkgs/top-level/all-packages.nix | 4 +- 2 files changed, 39 insertions(+), 31 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/quaternion/default.nix b/pkgs/applications/networking/instant-messengers/quaternion/default.nix index 55b24f71fb64..5acf71dbcb63 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 qtmultimedia qtquickcontrols qttools library ]; + + 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; + }; }; - 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; - }; +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; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d744f9866f13..cc359a681398 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -992,7 +992,9 @@ in libqmatrixclient_0_5 libqmatrixclient; - quaternion = libsForQt5.callPackage ../applications/networking/instant-messengers/quaternion { }; + inherit (libsForQt5.callPackage ../applications/networking/instant-messengers/quaternion { }) + quaternion + quaternion-git; tensor = libsForQt5.callPackage ../applications/networking/instant-messengers/tensor { }; From 05dfa99d1d899fa288253c9e4afd7897c286d7fa Mon Sep 17 00:00:00 2001 From: Peter Hoeg Date: Wed, 24 Apr 2019 12:26:45 +0800 Subject: [PATCH 3/3] matrique -> spectral --- .../instant-messengers/matrique/default.nix | 55 ------------------- pkgs/top-level/all-packages.nix | 3 +- 2 files changed, 2 insertions(+), 56 deletions(-) delete mode 100644 pkgs/applications/networking/instant-messengers/matrique/default.nix 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 91ba8e7175ce..000000000000 --- 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/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index cc359a681398..f5908850b37e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -18652,7 +18652,8 @@ in mm-common = callPackage ../development/libraries/mm-common { }; - matrique = libsForQt5.callPackage ../applications/networking/instant-messengers/matrique { }; + # Renamed + matrique = spectral; mpc-qt = libsForQt5.callPackage ../applications/video/mpc-qt { };