diff options
Diffstat (limited to 'pkgs/applications/networking/instant-messengers/telegram')
-rw-r--r-- | pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix | 16 | ||||
-rw-r--r-- | pkgs/applications/networking/instant-messengers/telegram/telegram-cli/default.nix | 49 |
2 files changed, 53 insertions, 12 deletions
diff --git a/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix b/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix index 1eb4b222f20..972fb1eab27 100644 --- a/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix +++ b/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix @@ -1,4 +1,4 @@ -{ mkDerivation, lib, fetchFromGitHub, callPackage, fetchpatch +{ mkDerivation, lib, fetchFromGitHub, callPackage , pkg-config, cmake, ninja, python3, wrapGAppsHook, wrapQtAppsHook , extra-cmake-modules , qtbase, qtimageformats, gtk3, libsForQt5, lz4, xxHash @@ -25,7 +25,7 @@ let tg_owt = callPackage ./tg_owt.nix {}; in mkDerivation rec { pname = "telegram-desktop"; - version = "2.8.11"; + version = "2.9.0"; # Note: Update via pkgs/applications/networking/instant-messengers/telegram/tdesktop/update.py # Telegram-Desktop with submodules @@ -34,17 +34,9 @@ in mkDerivation rec { repo = "tdesktop"; rev = "v${version}"; fetchSubmodules = true; - sha256 = "020ycgb77vx7rza590i3csrvq1zgm15rvpxqqcp0xkb4yh71i3hb"; + sha256 = "0964as7rkjq1px6z15z6kmkiz4zw69wmm3namwn940bsja123qls"; }; - patches = [(fetchpatch { - # ref: https://github.com/desktop-app/lib_webview/pull/9 - url = "https://github.com/desktop-app/lib_webview/commit/75e924934eee8624020befbef1f3cb5b865d3b86.patch"; - sha256 = "sha256-rN4FVK4KT+xNf9IVdcpbxMqT0+t3SINJPRRQPyMiDP0="; - stripLen = 1; - extraPrefix = "Telegram/lib_webview/"; - })]; - postPatch = '' substituteInPlace Telegram/CMakeLists.txt \ --replace '"''${TDESKTOP_LAUNCHER_BASENAME}.appdata.xml"' '"''${TDESKTOP_LAUNCHER_BASENAME}.metainfo.xml"' @@ -114,6 +106,6 @@ in mkDerivation rec { platforms = platforms.linux; homepage = "https://desktop.telegram.org/"; changelog = "https://github.com/telegramdesktop/tdesktop/releases/tag/v${version}"; - maintainers = with maintainers; [ primeos abbradar oxalica ]; + maintainers = with maintainers; [ oxalica primeos ]; }; } diff --git a/pkgs/applications/networking/instant-messengers/telegram/telegram-cli/default.nix b/pkgs/applications/networking/instant-messengers/telegram/telegram-cli/default.nix new file mode 100644 index 00000000000..bff3d3769a7 --- /dev/null +++ b/pkgs/applications/networking/instant-messengers/telegram/telegram-cli/default.nix @@ -0,0 +1,49 @@ +{ stdenv, fetchFromGitHub, jansson, lib, libconfig, libevent, libgcrypt, lua, lua53Packages +, makeWrapper, openssl, pkg-config, python3, readline, zlib +}: + +stdenv.mkDerivation rec { + pname = "telegram-cli"; + version = "20200106"; + + src = fetchFromGitHub { + owner = "kenorb-contrib"; + repo = "tg"; + rev = "refs/tags/${version}"; + sha256 = "sha256-wYBPr2b8IOycO9y/CNyGjnRsyGyYl3oiXYtTzwTurVA="; + fetchSubmodules = true; + }; + + buildInputs = [ + jansson + libconfig + libevent + libgcrypt + lua + lua53Packages.lgi + openssl + python3 + readline + zlib + ]; + nativeBuildInputs = [ + pkg-config + makeWrapper + ]; + + installPhase = '' + runHook preInstall + install -Dm755 ./bin/telegram-cli $out/bin/telegram-cli-keyless + install -Dm644 ./tg-server.pub -t $out/share/telegram-cli + makeWrapper $out/bin/telegram-cli-keyless $out/bin/telegram-cli \ + --add-flags "-k $out/share/telegram-cli/tg-server.pub" + runHook postInstall + ''; + + meta = with lib; { + description = "Command-line interface for Telegram, that uses readline interface, it's a client implementation of TGL library"; + downloadPage = "https://github.com/kenorb-contrib/tg"; + license = licenses.gpl2Only; + maintainers = with maintainers; [ superherointj ]; + }; +} |