From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id iJpKJHgIKGOmowAAbAwnHQ (envelope-from ) for ; Mon, 19 Sep 2022 08:13:12 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id OMw2JHgIKGOdxAAAauVa8A (envelope-from ) for ; Mon, 19 Sep 2022 08:13:12 +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 5588324385 for ; Mon, 19 Sep 2022 08:13:12 +0200 (CEST) Received: from localhost ([::1]:56740 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oaA1n-0000FC-4B for larch@yhetil.org; Mon, 19 Sep 2022 02:13:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37554) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oaA1e-0000Ds-Si for guix-patches@gnu.org; Mon, 19 Sep 2022 02:13:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:52856) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oaA1e-00063r-Jf for guix-patches@gnu.org; Mon, 19 Sep 2022 02:13:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oaA1e-0002XZ-Eh for guix-patches@gnu.org; Mon, 19 Sep 2022 02:13:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57675] [PATCH v4 04/10] gnu: webrtc-for-telegram-desktop: Use gexp. Resent-From: Hilton Chain Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 19 Sep 2022 06:13: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.16635679589715 (code B ref 57675); Mon, 19 Sep 2022 06:13:02 +0000 Received: (at 57675) by debbugs.gnu.org; 19 Sep 2022 06:12:38 +0000 Received: from localhost ([127.0.0.1]:51930 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oaA1G-0002Wd-6v for submit@debbugs.gnu.org; Mon, 19 Sep 2022 02:12:38 -0400 Received: from mail.boiledscript.com ([144.168.59.46]:38626) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oaA1D-0002WQ-WF for 57675@debbugs.gnu.org; Mon, 19 Sep 2022 02:12:36 -0400 Date: Mon, 19 Sep 2022 14:12:18 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ultrarare.space; s=dkim; t=1663567950; 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=qdhx3Ekh2JS5mf7vuxfdjsKjsBwMHheZIGH9DdeGvCE=; b=lALlkWTKsCp1jDJ+hSY25uQ39Yb0J+4ZCS7zH0Wq0klWAZH5hy+EvvcXe9+IZ4axDhc+zI nvTmczRCdJhs507jYn0m9/PGU3MZ99EdkBdWIcJSPn64m+eB3A78++ZYH48qyrHt22ODMF LJqRr1TuFW2CUa3g3cq6cUEoijgjXk8YUUJQMLR9cthCSkP3Cw1tBbRZxFQJzsWT/5Nxg1 E/pQQxCFtH2VzADfEdSqO3pUomVJxuRnVeThzO86PLMJAyF0KakMuSzh5Wt2Ul0GB7iibU /urE3cnIXQkmqfWsrH0qEc4TJ7Du4NOQ2LJ+4SGyApPUEKCW+m238GLhs21Dhw== 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=1663567992; 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=qdhx3Ekh2JS5mf7vuxfdjsKjsBwMHheZIGH9DdeGvCE=; b=rLSuEO2wR00tX3+j69vMwXayhFP5wA2xrQ3LBYlrMFwvGzIbou62hXG2lfUaQNxW/TLSVF KLZM9qWUqKHN/CY9oI8W9EG7nMoRQKVo60XuIEYpqHLCW0wqxxgrpjzrlyRcSqbl98BGUg GOv3YzRL5MI4ScKW77kCTx6VAytN3dXkX5aXSxSaAavSD6LQKoyQmkBJy4tlS2v8AD04oR TDrhdl9U6DQToWikjOLdnoJa4zpemobz91fdoLoaKMy7XVsuGnVdwndd/qX959a0Ii8U42 JChBWYxLWbMKtDaGlotR+cl82V7hkz57vipW2CruOsFTfsPaTETaJ4smCEWIGA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1663567992; a=rsa-sha256; cv=none; b=tghayqEcvVsWlx7Ga67Q5OnQJtXz+gomAOROTxxHn5A4UzdDUSqAxGcE/FNBuTGR1iBohv 7KBwdxncmRzvhfxi7La+9bVnhYMJVwyVkPvyhfEN4pptkzAvLKFZPLXL1ULIKgfJCS94nP shNlHPIHLYvFbBWKhhRg1WQXlWy5jZUE0T6vk5eAVxaJApx1pNcRAUYm1lljNzPaaKSyPX YZkzqBhP4OQ7DhWy/FYaGheUFFBBsUGhnUdsaCwlSJlPBdHc/iuC0/M7gswkXgsLax7Rt9 uOMhprZIqPWdIvTOguPXbEzYNalyi7l5IAIB6+3+q7vPiwXYRGTUwa9C9bQ6vg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=ultrarare.space header.s=dkim header.b=lALlkWTK; 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: -3.34 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=ultrarare.space header.s=dkim header.b=lALlkWTK; 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: 5588324385 X-Spam-Score: -3.34 X-Migadu-Scanner: scn1.migadu.com X-TUID: BJGQso0SNAEh * gnu/packages/telegram.scm (source-for-telegram-desktop, libvpx-for-telegram-desktop,libyuv-for-telegram-desktop): New variables. (webrtc-for-telegram-desktop)[#:phases]: Copy sources with gexp. [inputs]: Remove sources in flavor of variables. --- gnu/packages/telegram.scm | 116 ++++++++++++++++++-------------------- 1 file changed, 56 insertions(+), 60 deletions(-) diff --git a/gnu/packages/telegram.scm b/gnu/packages/telegram.scm index cfa0d1c673..e6766d84eb 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,33 @@ (define-module (gnu packages telegram) #:use-module (guix build-system python) #:use-module (guix build-system qt)) +(define* (source-for-telegram-desktop #:key name url revision commit hash) + (let ((name (string-append name "-for-telegram-desktop")) + (version (git-version "0" revision commit))) + (origin + (method git-fetch) + (uri (git-reference + (url url) + (commit commit))) + (file-name (git-file-name name version)) + (sha256 (base32 hash))))) + +(define libvpx-for-telegram-desktop + (source-for-telegram-desktop + #:url "https://chromium.googlesource.com/webm/libvpx" + #:revision "0" + #:commit "5b63f0f821e94f8072eb483014cfc33b05978bb9" + #:hash "1psvxaddihlw1k5n0anxif3qli6zyw2sa2ywn6mkb8six9myrp68" + #:name "libvpx")) + +(define libyuv-for-telegram-desktop + (source-for-telegram-desktop + #:url "https://chromium.googlesource.com/libyuv/libyuv" + #:revision "0" + #:commit "ad890067f661dc747a975bc55ba3767fe30d4452" + #:hash "01knnk4h247rq536097n9n3s3brxlbby3nv3ppdgsqfda3k159ll" + #:name "libyuv")) + (define-public webrtc-for-telegram-desktop (let ((commit "91d836dc84a16584c6ac52b36c04c0de504d9c34") (revision "166")) @@ -109,68 +137,36 @@ (define-public webrtc-for-telegram-desktop (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))))))) + (list #:tests? #f ; No target + #:configure-flags + #~`("-DCMAKE_C_FLAGS=-fPIC" + "-DCMAKE_CXX_FLAGS=-fPIC") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'copy-sources + (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 - (modify-inputs - `(("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"))))) - (append alsa-lib - ffmpeg - libjpeg-turbo - glib - libxcomposite - libxdamage - libxrender - libxrandr - openssl - opus - pipewire - protobuf - pulseaudio - libx11 - libxext - 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