From aa95e4f2aadec799e97c5f26f223c8e1563af8fa Mon Sep 17 00:00:00 2001 From: Viacheslav Lotsmanov Date: Mon, 13 Dec 2021 01:05:10 +0200 Subject: [PATCH] nheko: add identicons support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Nheko has support for identicons. There is a checkbox in the settings of nheko but it wasn’t clickable because the dependency (“qt-jdenticon” plugin) was missing. This change adds “qt-jdenticon” as a new package (Qt plugin) and as a dependency for Nheko. This package is maintained by Nheko team. --- .../instant-messengers/nheko/default.nix | 2 ++ .../libraries/qt-jdenticon/default.nix | 32 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 3 files changed, 36 insertions(+) create mode 100644 pkgs/development/libraries/qt-jdenticon/default.nix diff --git a/pkgs/applications/networking/instant-messengers/nheko/default.nix b/pkgs/applications/networking/instant-messengers/nheko/default.nix index 2a2c25e5593c9e..b947e4140ccb99 100644 --- a/pkgs/applications/networking/instant-messengers/nheko/default.nix +++ b/pkgs/applications/networking/instant-messengers/nheko/default.nix @@ -27,6 +27,7 @@ , voipSupport ? true , gst_all_1 , libnice +, qt-jdenticon }: mkDerivation rec { @@ -64,6 +65,7 @@ mkDerivation rec { coeurl libevent curl + qt-jdenticon ] ++ lib.optional stdenv.isDarwin qtmacextras ++ lib.optionals voipSupport (with gst_all_1; [ gstreamer diff --git a/pkgs/development/libraries/qt-jdenticon/default.nix b/pkgs/development/libraries/qt-jdenticon/default.nix new file mode 100644 index 00000000000000..2bc65849333e53 --- /dev/null +++ b/pkgs/development/libraries/qt-jdenticon/default.nix @@ -0,0 +1,32 @@ +{ lib, fetchFromGitHub, mkDerivation, qmake, qtbase }: + +mkDerivation rec { + pname = "qt-jdenticon"; + version = "0.2.1"; + + src = fetchFromGitHub { + owner = "Nheko-Reborn"; + repo = "qt-jdenticon"; + rev = "v${version}"; + sha256 = "1dk2cmz34pdn79k6lq6jlbvy0gfp0w2vv1w4f8c9xmgmf6brcxq1"; + }; + + nativeBuildInputs = [ qmake ]; + buildInputs = [ qtbase ]; + + dontWrapQtApps = true; + + postPatch = '' + # Fix plugins dir + substituteInPlace QtIdenticon.pro \ + --replace "\$\$[QT_INSTALL_PLUGINS]" "$out/$qtPluginPrefix" + ''; + + meta = with lib; { + description = "Qt plugin for generating highly recognizable identicons"; + homepage = "https://github.com/Nheko-Reborn/qt-jdenticon"; + license = licenses.mit; + platforms = platforms.all; + maintainers = with maintainers; [ unclechu ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 739759fae78338..e89f0d27cdab14 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -28044,6 +28044,8 @@ with pkgs; qxw = callPackage ../applications/editors/qxw {}; + qt-jdenticon = libsForQt5.callPackage ../development/libraries/qt-jdenticon {}; + rabbitvcs = callPackage ../applications/version-management/rabbitvcs {}; rakarrack = callPackage ../applications/audio/rakarrack {