diff mbox series

[bug#57675,v3,1/7] gnu: webrtc-for-telegram-desktop: Simplify inputs.

Message ID y76h71e8bln.wl-hako@ultrarare.space
State New
Headers show
Series gnu: telegram-desktop: Update to 4.1.1. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git-branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue
cbaines/comparison success View comparision
cbaines/git-branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Hilton Chain Sept. 11, 2022, 10:11 a.m. UTC
* gnu/packages/telegram.scm (webrtc-for-telegram-desktop): Simplify inputs.
---
 gnu/packages/telegram.scm | 84 +++++++++++----------------------------
 1 file changed, 23 insertions(+), 61 deletions(-)

--
2.37.3
diff mbox series

Patch

diff --git a/gnu/packages/telegram.scm b/gnu/packages/telegram.scm
index 4976acbc0c..9bef94788b 100644
--- a/gnu/packages/telegram.scm
+++ b/gnu/packages/telegram.scm
@@ -85,11 +85,12 @@  (define-public webrtc-for-telegram-desktop
           (uri
            (git-reference
             (url "https://github.com/desktop-app/tg_owt.git")
-            (commit commit)))
+            (commit commit)
+            (recursive? #t)))
           (file-name
            (git-file-name name version))
           (sha256
-           (base32 "0plwdp6xgxi27hif5j7kpq425cidxyxbbga3z2f64dsninwy5p1x"))
+           (base32 "1ir4svv5mijpzr0rmx65088iikck83vhcdqrpf9dnk6yp4j9v4v2"))
           (modules '((guix build utils)
                      (ice-9 ftw)
                      (srfi srfi-1)))
@@ -99,79 +100,40 @@  (define-public webrtc-for-telegram-desktop
                      '( ;; Custom forks which are incompatible with the ones in Guix.
                        "abseil-cpp" "libsrtp" "openh264" "rnnoise"
                        ;; Not available in Guix.
-                       "pffft" "usrsctp"
+                       "pffft" "usrsctp" "libyuv"
                        ;; 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))))
-                #t)))))
+                                             (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))
-                #t)))))
+           "-DCMAKE_CXX_FLAGS=-fPIC")))
        (native-inputs
-        `(("perl" ,perl)
-          ("pkg-config" ,pkg-config)
-          ("python" ,python-wrapper)
-          ("yasm" ,yasm)))
+        (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.")