telegram-desktop.tg_owt: 0-unstable-2024-06-15 -> 0-unstable-2024-07-30

Diff: c9cc4390ab...e9d103e248
This commit is contained in:
Nick Cao 2024-07-31 20:03:37 -04:00
parent e6aaa4a4b8
commit 338371a8dc
No known key found for this signature in database

View File

@ -1,79 +1,117 @@
{ lib, stdenv, fetchFromGitHub, fetchpatch
, pkg-config, cmake, ninja, yasm
, libjpeg, openssl, libopus, ffmpeg, alsa-lib, libpulseaudio, protobuf
, openh264, usrsctp, libevent, libvpx
, libX11, libXtst, libXcomposite, libXdamage, libXext, libXrender, libXrandr, libXi
, glib, abseil-cpp, pcre, util-linuxMinimal, libselinux, libsepol, pipewire
, mesa, libepoxy, libglvnd, unstableGitUpdater, darwin
{
lib,
stdenv,
fetchFromGitHub,
pkg-config,
cmake,
crc32c,
python3,
libjpeg,
openssl,
libopus,
ffmpeg,
openh264,
libvpx,
libXi,
libXfixes,
libXtst,
libXcomposite,
libXdamage,
libXext,
libXrender,
libXrandr,
glib,
abseil-cpp,
pipewire,
mesa,
libGL,
unstableGitUpdater,
darwin,
}:
stdenv.mkDerivation {
pname = "tg_owt";
version = "0-unstable-2024-06-15";
version = "0-unstable-2024-07-30";
src = fetchFromGitHub {
owner = "desktop-app";
repo = "tg_owt";
rev = "c9cc4390ab951f2cbc103ff783a11f398b27660b";
sha256 = "sha256-FfWmSYaeryTDbsGJT3R7YK1oiyJcrR7YKKBOF+9PmpY=";
rev = "e9d103e2480e0983bf464debc371b049cdd83648";
sha256 = "sha256-EbxQ5JozZM7z9e9ELcqZpuX9rxbk7BrOBM7FRj8T1ec=";
fetchSubmodules = true;
};
outputs = [ "out" "dev" ];
outputs = [
"out"
"dev"
];
nativeBuildInputs = [ pkg-config cmake ninja yasm ];
nativeBuildInputs = [
cmake
pkg-config
python3
];
buildInputs = [
libjpeg libopus ffmpeg protobuf openh264 usrsctp libevent libvpx abseil-cpp
] ++ lib.optionals stdenv.isLinux [
libX11 libXtst libXcomposite libXdamage libXext libXrender libXrandr libXi
glib pcre util-linuxMinimal libselinux libsepol pipewire alsa-lib libpulseaudio
mesa libepoxy libglvnd
] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
Cocoa
AppKit
IOKit
IOSurface
Foundation
AVFoundation
CoreMedia
VideoToolbox
CoreGraphics
CoreVideo
OpenGL
Metal
MetalKit
CoreFoundation
ApplicationServices
]);
buildInputs =
[
openssl
libjpeg
libopus
ffmpeg
]
++ lib.optionals stdenv.hostPlatform.isLinux [
glib
libXi
libXcomposite
libXdamage
libXext
libXfixes
libXrender
libXrandr
libXtst
pipewire
mesa
libGL
]
++ lib.optionals stdenv.hostPlatform.isDarwin (
with darwin.apple_sdk.frameworks;
[
Cocoa
AppKit
IOKit
IOSurface
Foundation
AVFoundation
CoreMedia
VideoToolbox
CoreGraphics
CoreVideo
Metal
MetalKit
CoreFoundation
ApplicationServices
]
);
patches = [
# GCC 12 Fix
(fetchpatch {
url = "https://github.com/desktop-app/tg_owt/pull/101/commits/86d2bcd7afb8706663d29e30f65863de5a626142.patch";
hash = "sha256-iWS0mB8R0vqPU/0qf6Ax54UCAKYDVCPac2mi/VHbFm0=";
})
# additional fix for GCC 12 + musl
(fetchpatch {
url = "https://git.alpinelinux.org/aports/plain/community/tg_owt/gcc12.patch?id=8120df03fa3b6db5b8ff92c7a52b680290ad6e20";
hash = "sha256-ikgxUH1e7pz0n0pKUemrPXXa4UkECX+w467M9gU68zs=";
})
propagatedBuildInputs = [
abseil-cpp
crc32c
openh264
libvpx
];
cmakeFlags = [
# Building as a shared library isn't officially supported and may break at any time.
"-DBUILD_SHARED_LIBS=OFF"
];
propagatedBuildInputs = [
# Required for linking downstream binaries.
abseil-cpp openh264 usrsctp libevent libvpx openssl
(lib.cmakeBool "BUILD_SHARED_LIBS" false)
];
passthru.updateScript = unstableGitUpdater { };
meta = with lib; {
license = licenses.bsd3;
maintainers = with maintainers; [ oxalica ];
meta = {
description = "Fork of Google's webrtc library for telegram-desktop";
homepage = "https://github.com/desktop-app/tg_owt";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ oxalica ];
platforms = lib.platforms.linux ++ lib.platforms.darwin;
};
}