diff --git a/pkgs/applications/networking/instant-messengers/telegram/telegram-desktop/unwrapped.nix b/pkgs/applications/networking/instant-messengers/telegram/telegram-desktop/unwrapped.nix index ca2ac9e5ab39..9d4aff8b32a1 100644 --- a/pkgs/applications/networking/instant-messengers/telegram/telegram-desktop/unwrapped.nix +++ b/pkgs/applications/networking/instant-messengers/telegram/telegram-desktop/unwrapped.nix @@ -28,6 +28,8 @@ microsoft-gsl, boost, ada, + pango, + tlottie, cmark-gfm, libfido2, libavif, @@ -45,16 +47,23 @@ # - https://git.alpinelinux.org/aports/tree/testing/telegram-desktop/APKBUILD # - https://github.com/void-linux/void-packages/blob/master/srcpkgs/telegram-desktop/template +let + needsPangoTlottie = [ + "64gram-unwrapped" + "ayugram-desktop-unwrapped" + "telegram-desktop-unwrapped" + ]; +in stdenv.mkDerivation (finalAttrs: { pname = "telegram-desktop-unwrapped"; - version = "7.1.5"; + version = "7.2.9"; src = fetchFromGitHub { owner = "telegramdesktop"; repo = "tdesktop"; rev = "v${finalAttrs.version}"; fetchSubmodules = true; - hash = "sha256-FbenDWiv4fxb6GHHsP0P7VLoMk6h+BYcfpomvS22b/c="; + hash = "sha256-AeeO3Ys+2MhNNPnMmu1AP8vs4ROK3X+Wh79x+Cizc6c="; }; nativeBuildInputs = [ @@ -93,6 +102,12 @@ stdenv.mkDerivation (finalAttrs: { kcoreaddons hunspell ] + ++ lib.optionals (lib.elem finalAttrs.pname needsPangoTlottie && stdenv.hostPlatform.isLinux) [ + pango + ] + ++ lib.optionals (lib.elem finalAttrs.pname needsPangoTlottie) [ + tlottie + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ apple-sdk_15 libicns diff --git a/pkgs/by-name/_6/_64gram/package.nix b/pkgs/by-name/_6/_64gram/package.nix index 7e5e7122a40d..37ee3b21f262 100644 --- a/pkgs/by-name/_6/_64gram/package.nix +++ b/pkgs/by-name/_6/_64gram/package.nix @@ -10,13 +10,13 @@ telegram-desktop.override { inherit withWebkit; unwrapped = telegram-desktop.unwrapped.overrideAttrs (old: rec { pname = "64gram-unwrapped"; - version = "1.2.8"; + version = "1.2.10"; src = fetchFromGitHub { owner = "TDesktop-x64"; repo = "tdesktop"; tag = "v${version}"; - hash = "sha256-B/Gr8QxpIk81/ZFdcLB5Rjo9044p3lflv3jJpmmBsbA="; + hash = "sha256-EOXEkXuLJ2p9Y4BBekK7sz5/zkXS570r1npIX6o+o4E="; fetchSubmodules = true; }; diff --git a/pkgs/by-name/ay/ayugram-desktop/package.nix b/pkgs/by-name/ay/ayugram-desktop/package.nix index 0228b5cb060d..5781bb56663a 100644 --- a/pkgs/by-name/ay/ayugram-desktop/package.nix +++ b/pkgs/by-name/ay/ayugram-desktop/package.nix @@ -12,16 +12,13 @@ telegram-desktop.override { unwrapped = telegram-desktop.unwrapped.overrideAttrs ( finalAttrs: previousAttrs: { pname = "ayugram-desktop-unwrapped"; - version = "7.0.9"; + version = "7.2.9"; src = fetchFromGitHub { owner = "AyuGram"; repo = "AyuGramDesktop"; - # tag = "v${finalAttrs.version}"; - # v7.0.9 tag contains a codegen bug due to an outdated submodule - # https://github.com/AyuGram/codegen/pull/3 - rev = "db3b9891cb0b04ebb7d8c0e71ada3bcc669b910a"; - hash = "sha256-JSx6qPpVul3NX8stNZzZX/ckNBQ3uXZP7lofb6eWauM="; + tag = "v${finalAttrs.version}"; + hash = "sha256-JlZWJ+fWdJqgDMpPFLfkfFp/O65eQaA8GQD6ZY/SI/k="; fetchSubmodules = true; }; diff --git a/pkgs/by-name/tl/tlottie/package.nix b/pkgs/by-name/tl/tlottie/package.nix new file mode 100644 index 000000000000..4458f63a90d1 --- /dev/null +++ b/pkgs/by-name/tl/tlottie/package.nix @@ -0,0 +1,53 @@ +{ + lib, + stdenv, + rustPlatform, + fetchFromGitHub, + fixDarwinDylibNames, + nix-update-script, +}: + +rustPlatform.buildRustPackage (finalAttrs: { + pname = "tlottie"; + version = "1.0.6"; + + __structuredAttrs = true; + + src = fetchFromGitHub { + owner = "dkaraush"; + repo = "tlottie"; + tag = "v${finalAttrs.version}"; + hash = "sha256-WtYyyf7AL+jtYY368X26PTnKSBUSZ9+IZjod/T5Oceg="; + }; + + cargoHash = "sha256-ZICtOSL3BxNSrgHYir+GGb8vCEYCHZhZAjZMOIwQYE0="; + + buildFeatures = [ "c-api" ]; + + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ + fixDarwinDylibNames + ]; + + checkFlags = [ + # Limit and budget tests that fail on Darwin due to allocator/budget margin differences + "--skip=dos::renderer_rejects_generated_work_after_successful_parse" + "--skip=dos::animated_repeater_product_stays_bounded" + "--skip=dos::clipped_dashed_round_join_zigzag_stays_bounded" + "--skip=dos::compounding_repeaters_are_rejected" + "--skip=dos::nested_track_matte_target_surfaces_stay_bounded" + "--skip=dos::renderer_rejects_large_canvas_before_allocating_fallback" + ]; + + postInstall = '' + install -Dm644 include/tlottie.h -t "''${!outputInclude:?}/include" + ''; + + passthru.updateScript = nix-update-script { }; + + meta = { + description = "Rust library for drawing Lottie animations"; + homepage = "https://github.com/dkaraush/tlottie"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ nickcao ]; + }; +})