[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#57675] [PATCH v5 03/11] gnu: webrtc-for-telegram-desktop: Use moder
From: |
Hilton Chain |
Subject: |
[bug#57675] [PATCH v5 03/11] gnu: webrtc-for-telegram-desktop: Use modern package style. |
Date: |
Tue, 20 Sep 2022 07:34:26 +0800 |
* 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 flavor 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..9e68965607 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 "0")
+ (name "libvpx-for-telegram-desktop")
+ (version (git-version "0" revision commit)))
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://chromium.googlesource.com/webm/libvpx")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1psvxaddihlw1k5n0anxif3qli6zyw2sa2ywn6mkb8six9myrp68")))))
+
+(define libyuv-for-telegram-desktop
+ (let* ((commit "ad890067f661dc747a975bc55ba3767fe30d4452")
+ (revision "0")
+ (name "libyuv-for-telegram-desktop")
+ (version (git-version "0" revision commit)))
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://chromium.googlesource.com/libyuv/libyuv")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (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
- [bug#57675] [PATCH v4 06/10] gnu: Add abseil-cpp-cxxstd17., (continued)
- [bug#57675] [PATCH v4 06/10] gnu: Add abseil-cpp-cxxstd17., Hilton Chain, 2022/09/19
- [bug#57675] [PATCH v4 07/10] gnu: extra-cmake-modules: Update to 5.98.0., Hilton Chain, 2022/09/19
- [bug#57675] [PATCH v4 08/10] gnu: kcoreaddons: Update to 5.98.0., Hilton Chain, 2022/09/19
- [bug#57675] [PATCH v4 09/10] gnu: webrtc-for-telegram-desktop: Update to 621f3d., Hilton Chain, 2022/09/19
- [bug#57675] [PATCH v4 10/10] gnu: telegram-desktop: Update to 4.2.0., Hilton Chain, 2022/09/19
- [bug#57675] [PATCH v4 10/10] gnu: telegram-desktop: Update to 4.2.0., Liliana Marie Prikler, 2022/09/19
- [bug#57675] [PATCH v4 08/10] gnu: kcoreaddons: Update to 5.98.0., Liliana Marie Prikler, 2022/09/19
[bug#57675] [PATCH v5 00/11] gnu: telegram-desktop: Update to 4.2.0., Hilton Chain, 2022/09/19
- [bug#57675] [PATCH v5 01/11] gnu: webrtc-for-telegram-desktop: Delete trailing #t., Hilton Chain, 2022/09/19
- [bug#57675] [PATCH v5 02/11] gnu: telegram-desktop: Delete trailing #t., Hilton Chain, 2022/09/19
- [bug#57675] [PATCH v5 03/11] gnu: webrtc-for-telegram-desktop: Use modern package style.,
Hilton Chain <=
- [bug#57675] [PATCH v5 04/11] gnu: telegram-desktop: Use modern package style., Hilton Chain, 2022/09/19
- [bug#57675] [PATCH v5 05/11] gnu: telegram-desktop: Change Api ID., Hilton Chain, 2022/09/19
- [bug#57675] [PATCH v5 06/11] gnu: Add abseil-cpp-cxxstd17., Hilton Chain, 2022/09/19
- [bug#57675] [PATCH v5 07/11] gnu: extra-cmake-modules: Update to 5.98.0., Hilton Chain, 2022/09/19
- [bug#57675] [PATCH v5 08/11] gnu: kcoreaddons: Remove trailing #t., Hilton Chain, 2022/09/19
- [bug#57675] [PATCH v5 09/11] gnu: kcoreaddons: Update to 5.98.0., Hilton Chain, 2022/09/19
- [bug#57675] [PATCH v5 10/11] gnu: webrtc-for-telegram-desktop: Update to 621f3d., Hilton Chain, 2022/09/19
- [bug#57675] [PATCH v5 11/11] gnu: telegram-desktop: Update to 4.2.0., Hilton Chain, 2022/09/19
- [bug#57675] [PATCH v5 11/11] gnu: telegram-desktop: Update to 4.2.0., Liliana Marie Prikler, 2022/09/20
- [bug#57675] [PATCH v5 11/11] gnu: telegram-desktop: Update to 4.2.0., Hilton Chain, 2022/09/20