From 8f1881caffd1b13148a7319939c6242d20488465 Mon Sep 17 00:00:00 2001 From: Samuel Dionne-Riel Date: Thu, 22 Dec 2022 17:11:46 -0500 Subject: [PATCH] tokodon: Init at 22.11.2 This commit is artificially built over the end-results of the Nixpkgs PR https://github.com/NixOS/nixpkgs/pull/170466 with the package now being built in the way Plasma Mobile Gear packages are built. Main differences: - `mkDerivation` from the Plasma Mobile Gear package set, and related changes (dropping redundant wrapQtAppsHook). - inputs re-ordered and split by usage like sibling packages. The actual work though was by @matthiasbeyer, I only mechanically rehashed the changes. Co-authored-by: Matthias Beyer --- pkgs/applications/plasma-mobile/default.nix | 1 + pkgs/applications/plasma-mobile/tokodon.nix | 78 +++++++++++++++++++++ 2 files changed, 79 insertions(+) create mode 100644 pkgs/applications/plasma-mobile/tokodon.nix diff --git a/pkgs/applications/plasma-mobile/default.nix b/pkgs/applications/plasma-mobile/default.nix index 48a3f1281fcb..86a4f1d10071 100644 --- a/pkgs/applications/plasma-mobile/default.nix +++ b/pkgs/applications/plasma-mobile/default.nix @@ -79,6 +79,7 @@ let plasma-settings = callPackage ./plasma-settings.nix {}; plasmatube = callPackage ./plasmatube {}; spacebar = callPackage ./spacebar.nix { inherit srcs; }; + tokodon = callPackage ./tokodon.nix {}; }; in lib.makeScope libsForQt5.newScope packages diff --git a/pkgs/applications/plasma-mobile/tokodon.nix b/pkgs/applications/plasma-mobile/tokodon.nix new file mode 100644 index 000000000000..a412835c8ccd --- /dev/null +++ b/pkgs/applications/plasma-mobile/tokodon.nix @@ -0,0 +1,78 @@ +{ lib +, mkDerivation + +, cmake +, extra-cmake-modules +, pkg-config + +, kconfig +, kdbusaddons +, ki18n +, kirigami2 +, kirigami-addons +, knotifications +, libwebsockets +, qqc2-desktop-style +, qtbase +, qtkeychain +, qtmultimedia +, qtquickcontrols2 +, qttools +, qtwebsockets +, kitemmodels +, pimcommon + +# Workarounds for the point release being missing. +, libsForQt5 +, fetchFromGitLab +}: + +# NOTE: we cannot use `mkDerivation` injected by the Plasma Mobile package +# set for the point release, as the point release was not uploaded to +# the Plasma Mobile gear repo, and the injected `mkDerivation` only can +# use the src (and version) from the `srcs` set. +libsForQt5.mkDerivation rec { + pname = "tokodon"; + + version = "22.11.2"; + # NOTE: the tokodon point release was not uploaded to the Plasma Mobile gear repo. + src = fetchFromGitLab { + domain = "invent.kde.org"; + owner = "network"; + repo = pname; + rev = "v${version}"; + hash = "sha256-uE9iHZDfpn1NTCeJPgsp2WBe0curdguTUbMTrkrmJ6M="; + }; + + nativeBuildInputs = [ + cmake + extra-cmake-modules + pkg-config + ]; + + buildInputs = [ + kconfig + kdbusaddons + ki18n + kirigami2 + kirigami-addons + knotifications + qqc2-desktop-style + qtbase + qtkeychain + qtmultimedia + qtquickcontrols2 + qttools + qtwebsockets + kitemmodels + pimcommon + ]; + + meta = with lib; { + description = "A Mastodon client for Plasma and Plasma Mobile"; + homepage = "https://invent.kde.org/network/tokodon"; + license = licenses.gpl3Plus; + platforms = platforms.unix; + maintainers = with maintainers; [ matthiasbeyer ]; + }; +}