gnu: webrtc-for-telegram-desktop: Use modern package style.
* gnu/packages/telegram.scm (libvpx-for-telegram-desktop) (libyuv-for-telegram-desktop): New variables. (webrtc-for-telegram-desktop)[arguments]: Convert to list of G-Expressions. Inline libvpx-for-telegram-desktop and libyuv-for-telegram-desktop. [inputs]: Remove libvpx and libyuv. Drop labels. Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>master
parent
425e4f6fcd
commit
e76c93a56b
|
@ -62,6 +62,7 @@
|
||||||
#:use-module (gnu packages xorg)
|
#:use-module (gnu packages xorg)
|
||||||
#:use-module ((guix licenses) #:prefix license:)
|
#:use-module ((guix licenses) #:prefix license:)
|
||||||
#:use-module (guix packages)
|
#:use-module (guix packages)
|
||||||
|
#:use-module (guix gexp)
|
||||||
#:use-module (guix git-download)
|
#:use-module (guix git-download)
|
||||||
#:use-module (guix build-system cmake)
|
#:use-module (guix build-system cmake)
|
||||||
#:use-module (guix build-system copy)
|
#:use-module (guix build-system copy)
|
||||||
|
@ -71,6 +72,36 @@
|
||||||
#:use-module (guix build-system python)
|
#:use-module (guix build-system python)
|
||||||
#:use-module (guix build-system qt))
|
#: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
|
(define-public webrtc-for-telegram-desktop
|
||||||
(let ((commit "91d836dc84a16584c6ac52b36c04c0de504d9c34")
|
(let ((commit "91d836dc84a16584c6ac52b36c04c0de504d9c34")
|
||||||
(revision "166"))
|
(revision "166"))
|
||||||
|
@ -94,7 +125,7 @@
|
||||||
(ice-9 ftw)
|
(ice-9 ftw)
|
||||||
(srfi srfi-1)))
|
(srfi srfi-1)))
|
||||||
(snippet
|
(snippet
|
||||||
`(begin
|
#~(begin
|
||||||
(let ((keep
|
(let ((keep
|
||||||
'( ;; Custom forks which are incompatible with the ones in Guix.
|
'( ;; Custom forks which are incompatible with the ones in Guix.
|
||||||
"abseil-cpp" "libsrtp" "openh264" "rnnoise"
|
"abseil-cpp" "libsrtp" "openh264" "rnnoise"
|
||||||
|
@ -109,67 +140,39 @@
|
||||||
(cons* "." ".." keep)))))))))
|
(cons* "." ".." keep)))))))))
|
||||||
(build-system cmake-build-system)
|
(build-system cmake-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(#:tests? #f ; No target
|
|
||||||
#:configure-flags
|
|
||||||
(list
|
(list
|
||||||
"-DCMAKE_C_FLAGS=-fPIC"
|
#:tests? #f ; No target
|
||||||
|
#:configure-flags #~(list "-DCMAKE_C_FLAGS=-fPIC"
|
||||||
"-DCMAKE_CXX_FLAGS=-fPIC")
|
"-DCMAKE_CXX_FLAGS=-fPIC")
|
||||||
#:phases
|
#:phases
|
||||||
(modify-phases %standard-phases
|
#~(modify-phases %standard-phases
|
||||||
(add-after 'unpack 'copy-inputs
|
(add-after 'unpack 'copy-inputs
|
||||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
(lambda _
|
||||||
(let* ((libvpx-from (assoc-ref inputs "libvpx"))
|
(let* ((third-party (string-append (getcwd) "/src/third_party"))
|
||||||
(libyuv-from (assoc-ref inputs "libyuv"))
|
(libvpx-to (string-append third-party
|
||||||
(libvpx-to (string-append (getcwd)
|
"/libvpx/source/libvpx"))
|
||||||
"/src/third_party/libvpx/source/libvpx"))
|
(libyuv-to (string-append third-party "/libyuv")))
|
||||||
(libyuv-to (string-append (getcwd)
|
(copy-recursively #$libvpx-for-telegram-desktop libvpx-to)
|
||||||
"/src/third_party/libyuv")))
|
(copy-recursively #$libyuv-for-telegram-desktop
|
||||||
(copy-recursively libvpx-from libvpx-to)
|
libyuv-to)))))))
|
||||||
(copy-recursively libyuv-from libyuv-to)))))))
|
(native-inputs (list perl pkg-config python-wrapper yasm))
|
||||||
(native-inputs
|
|
||||||
`(("perl" ,perl)
|
|
||||||
("pkg-config" ,pkg-config)
|
|
||||||
("python" ,python-wrapper)
|
|
||||||
("yasm" ,yasm)))
|
|
||||||
(inputs
|
(inputs
|
||||||
`(("alsa" ,alsa-lib)
|
(list alsa-lib
|
||||||
("ffmpeg" ,ffmpeg)
|
ffmpeg
|
||||||
("libjpeg" ,libjpeg-turbo)
|
libjpeg-turbo
|
||||||
("glib" ,glib)
|
glib
|
||||||
("libvpx"
|
libxcomposite
|
||||||
,(origin
|
libxdamage
|
||||||
(method git-fetch)
|
libxrender
|
||||||
(uri
|
libxrandr
|
||||||
(git-reference
|
openssl
|
||||||
(url "https://chromium.googlesource.com/webm/libvpx")
|
opus
|
||||||
(commit "5b63f0f821e94f8072eb483014cfc33b05978bb9")))
|
pipewire
|
||||||
(file-name
|
protobuf
|
||||||
(git-file-name "libvpx-for-webrtc-for-telegram-desktop" version))
|
pulseaudio
|
||||||
(sha256
|
libx11
|
||||||
(base32 "1psvxaddihlw1k5n0anxif3qli6zyw2sa2ywn6mkb8six9myrp68"))))
|
libxext
|
||||||
("libyuv"
|
libxtst))
|
||||||
,(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)))
|
|
||||||
(synopsis "WebRTC support for Telegram Desktop")
|
(synopsis "WebRTC support for Telegram Desktop")
|
||||||
(description "WebRTC-for-Telegram-Desktop is a custom WebRTC fork by
|
(description "WebRTC-for-Telegram-Desktop is a custom WebRTC fork by
|
||||||
Telegram project, for its use in telegram desktop client.")
|
Telegram project, for its use in telegram desktop client.")
|
||||||
|
|
Reference in New Issue