nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 fetchpatch,
6 telegram-desktop,
7 alsa-lib,
8 jemalloc,
9 libopus,
10 libpulseaudio,
11 withWebkit ? true,
12}:
13
14telegram-desktop.override {
15 pname = "64gram";
16 inherit withWebkit;
17 unwrapped = telegram-desktop.unwrapped.overrideAttrs (old: rec {
18 pname = "64gram-unwrapped";
19 version = "1.1.58";
20
21 src = fetchFromGitHub {
22 owner = "TDesktop-x64";
23 repo = "tdesktop";
24 tag = "v${version}";
25 hash = "sha256-RHybrvm5p8BUt5StT/NuR76f2y1CCICirTMjdeRLtkY=";
26 fetchSubmodules = true;
27 };
28
29 patches = [
30 (fetchpatch {
31 # https://github.com/desktop-app/lib_base/pull/268
32 url = "https://github.com/desktop-app/lib_base/commit/c952da37294b958e896b27528e7834f0892faa0a.patch";
33 extraPrefix = "Telegram/lib_base/";
34 stripLen = 1;
35 hash = "sha256-xiq8WLAiSZwpvdyK5JbRAdQ9us93+9oMmeMBqVb1TbI=";
36 })
37 ];
38
39 buildInputs = (old.buildInputs or [ ]) ++ [
40 alsa-lib
41 jemalloc
42 libopus
43 libpulseaudio
44 ];
45
46 cmakeFlags = (old.cmakeFlags or [ ]) ++ [
47 (lib.cmakeBool "DESKTOP_APP_DISABLE_AUTOUPDATE" true)
48 ];
49
50 meta = {
51 description = "Unofficial Telegram Desktop providing Windows 64bit build and extra features";
52 license = lib.licenses.gpl3Only;
53 platforms = lib.platforms.all;
54 homepage = "https://github.com/TDesktop-x64/tdesktop";
55 changelog = "https://github.com/TDesktop-x64/tdesktop/releases/tag/v${version}";
56 maintainers = with lib.maintainers; [ clot27 ];
57 mainProgram = if stdenv.hostPlatform.isLinux then "telegram-desktop" else "Telegram";
58 };
59 });
60}