From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id IHUTGx0iKmN1sAAAbAwnHQ (envelope-from ) for ; Tue, 20 Sep 2022 22:27:09 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id AGXfGh0iKmOefgEAauVa8A (envelope-from ) for ; Tue, 20 Sep 2022 22:27:09 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 12E353B951 for ; Tue, 20 Sep 2022 22:27:09 +0200 (CEST) Received: from localhost ([::1]:35740 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oajpk-0007vq-5k for larch@yhetil.org; Tue, 20 Sep 2022 16:27:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60442) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oafI3-0007oq-5e for guix-patches@gnu.org; Tue, 20 Sep 2022 11:36:10 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:60221) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oafI2-0001RI-Hf for guix-patches@gnu.org; Tue, 20 Sep 2022 11:36:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oafI2-00044F-DD for guix-patches@gnu.org; Tue, 20 Sep 2022 11:36:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57675] [PATCH v6 03/11] gnu: webrtc-for-telegram-desktop: Use modern package Resent-From: Hilton Chain Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 20 Sep 2022 15:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57675 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57675@debbugs.gnu.org Cc: Liliana Marie Prikler Received: via spool by 57675-submit@debbugs.gnu.org id=B57675.166368812815574 (code B ref 57675); Tue, 20 Sep 2022 15:36:02 +0000 Received: (at 57675) by debbugs.gnu.org; 20 Sep 2022 15:35:28 +0000 Received: from localhost ([127.0.0.1]:59295 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oafHT-000438-UB for submit@debbugs.gnu.org; Tue, 20 Sep 2022 11:35:28 -0400 Received: from mail.boiledscript.com ([144.168.59.46]:49072) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oafHS-00042v-Aq for 57675@debbugs.gnu.org; Tue, 20 Sep 2022 11:35:26 -0400 Date: Tue, 20 Sep 2022 23:35:07 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ultrarare.space; s=dkim; t=1663688120; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=NaRF7T3RCDMoxeqyqnIrfy39gov66Q6uDd5M+6GUgqM=; b=jpod4lUSaXD9EOjHvJG3A2OsoesNA8HbxuaEpiXj3gr8T2hQBb9uTF4kaGzkg1PzW6f6sz dRVV0uj8RPsGZg284AJwTtPld2Ym4qApF3QxRHP6phuIkxLak06aF1CrTc1EwUadnX8zqF zMSIdZZH3y+6ecJDlp7wT3Sieh048QP2xysrMmhOIEzXBR4205nWQQ/EeLvTPG1gZMkBkD 5PdXCJToSDTO7z21/4YWHtHIi7ZFXcQJ0TeyPodVZk27rQb/ok2OMbb4rgpbJqPbUnyfBy EyF/8QDp30+Y6NoSwA6UdNxTTP79tfcAbXMQGoO92rq2YLjShSvDkQEEpFOsiA== Message-ID: In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spamd-Bar: / X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" Reply-to: Hilton Chain X-ACL-Warn: , Hilton Chain via Guix-patches From: Hilton Chain via Guix-patches via X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1663705629; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=NaRF7T3RCDMoxeqyqnIrfy39gov66Q6uDd5M+6GUgqM=; b=HSvDpyHGcL+cKDEGfEnPn71ux5qvB0aQ7i9XPUbc+d/MneiZg7WDTo08tmLCXoNOCQFbz+ L9XC/9IaIdnDZY54uedzQDdYJ4SfISVskg/X9QY7JVsDjW+zO48Yz8ZfE5/iTeE7x09x6H rbqaUAkzfO9Kulso1Dvgz/gT7MAVWF4OILVZafDr+kZusezPz2oOfyWltXjzpgth+0k/Sr ZEMXu+5aP3BA1iXTMa58W5vWARgxuDCGlknCo1Rly3yECREtHJH9EkQvfADp+L0LnY52kR V0XmheDukjdLbTbx3zDUTwRJjnQaNEFQFg9yMsNat8gNaqZAieJ7i/+BzqHURg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1663705629; a=rsa-sha256; cv=none; b=qiLoNFanR0Hy5QIEXzGO0UQ8oFONHj8zjQNn1y7ji41RIpbOKlLYrKNbTqidQEwHTyV8l3 h2JUnFB6ef1PZPsoE1Sd8WPFaZ933+1B3cVv/Na5EE9p8h8AAopLFY9XmikBSn81brXwAs 5hpdYDNkSW3SmERG5/g8SGWCP8HZKr1joIB/mha+0qQ+RbphjnPtyVwR2wLIo2tVLCR9hC S4JCU8ey/52LjwFoLJE7Jj/MIy1YB4r9K2+ljwar152IbyH+sLsHOVftqOlh8VjEZUtDPs tRDTKe/KjuYglGv0aMq5E2VnGL5K7rFyzeqheemo4l38fxF2+ucnknfpwdPtCg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=ultrarare.space header.s=dkim header.b=jpod4lUS; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.63 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=ultrarare.space header.s=dkim header.b=jpod4lUS; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 12E353B951 X-Spam-Score: -2.63 X-Migadu-Scanner: scn0.migadu.com X-TUID: yLtI2tr11AWk style. * gnu/packages/telegram.scm (libvpx-for-telegram-desktop, libyuv-for-telegram-desktop): New variables. (webrtc-for-telegram-desktop)[#:phases]: Copy sources with gexp. [inputs]: Remove sources in favor of variables. --- gnu/packages/telegram.scm | 148 +++++++++++++++++++------------------- 1 file changed, 75 insertions(+), 73 deletions(-) diff --git a/gnu/packages/telegram.scm b/gnu/packages/telegram.scm index 08a72d2e0f..b9844c75f4 100644 --- a/gnu/packages/telegram.scm +++ b/gnu/packages/telegram.scm @@ -62,6 +62,7 @@ (define-module (gnu packages telegram) #:use-module (gnu packages xorg) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) + #:use-module (guix gexp) #:use-module (guix git-download) #:use-module (guix build-system cmake) #:use-module (guix build-system copy) @@ -71,6 +72,36 @@ (define-module (gnu packages telegram) #:use-module (guix build-system python) #:use-module (guix build-system qt)) +(define libvpx-for-telegram-desktop + (let ((commit "5b63f0f821e94f8072eb483014cfc33b05978bb9") + (revision "112")) + (origin + (method git-fetch) + (uri (git-reference + (url "https://chromium.googlesource.com/webm/libvpx") + (commit commit))) + (file-name (git-file-name + "libvpx-for-telegram-desktop" + (git-version "1.9.0" revision commit))) + (sha256 + (base32 + "1psvxaddihlw1k5n0anxif3qli6zyw2sa2ywn6mkb8six9myrp68"))))) + +(define libyuv-for-telegram-desktop + (let ((commit "ad890067f661dc747a975bc55ba3767fe30d4452") + (revision "2211")) + (origin + (method git-fetch) + (uri (git-reference + (url "https://chromium.googlesource.com/libyuv/libyuv") + (commit commit))) + (file-name (git-file-name + "libyuv-for-telegram-desktop" + (git-version "0" revision commit))) + (sha256 + (base32 + "01knnk4h247rq536097n9n3s3brxlbby3nv3ppdgsqfda3k159ll"))))) + (define-public webrtc-for-telegram-desktop (let ((commit "91d836dc84a16584c6ac52b36c04c0de504d9c34") (revision "166")) @@ -94,82 +125,53 @@ (define-public webrtc-for-telegram-desktop (ice-9 ftw) (srfi srfi-1))) (snippet - `(begin - (let ((keep - '( ;; Custom forks which are incompatible with the ones in Guix. - "abseil-cpp" "libsrtp" "openh264" "rnnoise" - ;; Not available in Guix. - "pffft" "usrsctp" - ;; Has cmake support files for libvpx input. - "libvpx"))) - (with-directory-excursion "src/third_party" - (for-each delete-file-recursively - (lset-difference string=? - (scandir ".") - (cons* "." ".." keep))))))))) + #~(begin + (let ((keep + '( ;; Custom forks which are incompatible with the ones in Guix. + "abseil-cpp" "libsrtp" "openh264" "rnnoise" + ;; Not available in Guix. + "pffft" "usrsctp" + ;; Has cmake support files for libvpx input. + "libvpx"))) + (with-directory-excursion "src/third_party" + (for-each delete-file-recursively + (lset-difference string=? + (scandir ".") + (cons* "." ".." keep))))))))) (build-system cmake-build-system) (arguments - `(#:tests? #f ; No target - #:configure-flags - (list - "-DCMAKE_C_FLAGS=-fPIC" - "-DCMAKE_CXX_FLAGS=-fPIC") - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'copy-inputs - (lambda* (#:key inputs outputs #:allow-other-keys) - (let* ((libvpx-from (assoc-ref inputs "libvpx")) - (libyuv-from (assoc-ref inputs "libyuv")) - (libvpx-to (string-append (getcwd) - "/src/third_party/libvpx/source/libvpx")) - (libyuv-to (string-append (getcwd) - "/src/third_party/libyuv"))) - (copy-recursively libvpx-from libvpx-to) - (copy-recursively libyuv-from libyuv-to))))))) - (native-inputs - `(("perl" ,perl) - ("pkg-config" ,pkg-config) - ("python" ,python-wrapper) - ("yasm" ,yasm))) + (list #:tests? #f ; No target + #:configure-flags + #~`("-DCMAKE_C_FLAGS=-fPIC" + "-DCMAKE_CXX_FLAGS=-fPIC") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'copy-inputs + (lambda _ + (let* ((libvpx-to (string-append (getcwd) + "/src/third_party/libvpx/source/libvpx")) + (libyuv-to (string-append (getcwd) + "/src/third_party/libyuv"))) + (copy-recursively #$libvpx-for-telegram-desktop libvpx-to) + (copy-recursively #$libyuv-for-telegram-desktop libyuv-to))))))) + (native-inputs (list perl pkg-config python-wrapper yasm)) (inputs - `(("alsa" ,alsa-lib) - ("ffmpeg" ,ffmpeg) - ("libjpeg" ,libjpeg-turbo) - ("glib" ,glib) - ("libvpx" - ,(origin - (method git-fetch) - (uri - (git-reference - (url "https://chromium.googlesource.com/webm/libvpx") - (commit "5b63f0f821e94f8072eb483014cfc33b05978bb9"))) - (file-name - (git-file-name "libvpx-for-webrtc-for-telegram-desktop" version)) - (sha256 - (base32 "1psvxaddihlw1k5n0anxif3qli6zyw2sa2ywn6mkb8six9myrp68")))) - ("libyuv" - ,(origin - (method git-fetch) - (uri - (git-reference - (url "https://chromium.googlesource.com/libyuv/libyuv") - (commit "ad890067f661dc747a975bc55ba3767fe30d4452"))) - (file-name - (git-file-name "libyuv-for-webrtc-for-telegram-desktop" version)) - (sha256 - (base32 "01knnk4h247rq536097n9n3s3brxlbby3nv3ppdgsqfda3k159ll")))) - ("libxcomposite" ,libxcomposite) - ("libxdamage" ,libxdamage) - ("libxrender" ,libxrender) - ("libxrandr" ,libxrandr) - ("openssl" ,openssl) - ("opus" ,opus) - ("pipewire" ,pipewire) - ("protobuf" ,protobuf) - ("pulseaudio" ,pulseaudio) - ("x11" ,libx11) - ("xext" ,libxext) - ("xtst" ,libxtst))) + (list alsa-lib + ffmpeg + libjpeg-turbo + glib + libxcomposite + libxdamage + libxrender + libxrandr + openssl + opus + pipewire + protobuf + pulseaudio + libx11 + libxext + libxtst)) (synopsis "WebRTC support for Telegram Desktop") (description "WebRTC-for-Telegram-Desktop is a custom WebRTC fork by Telegram project, for its use in telegram desktop client.") -- 2.37.3