unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob f47c82277cc21e922ff7061c5203bddb989f7334 8779 bytes (raw)
name: gnu/packages/telegram.scm 	 # note: path name is non-authoritative(*)

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
 
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2021 Raghav Gururajan <rg@raghavgururajan.name>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (gnu packages telegram)
  #:use-module (gnu packages)
  #:use-module (gnu packages assembly)
  #:use-module (gnu packages autotools)
  #:use-module (gnu packages check)
  #:use-module (gnu packages image)
  #:use-module (gnu packages linux)
  #:use-module (gnu packages pkg-config)
  #:use-module (gnu packages protobuf)
  #:use-module (gnu packages pulseaudio)
  #:use-module (gnu packages python)
  #:use-module (gnu packages tls)
  #:use-module (gnu packages video)
  #:use-module (gnu packages xiph)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix packages)
  #:use-module (guix git-download)
  #:use-module (guix build-system cmake)
  #:use-module (guix build-system gnu)
  #:use-module (guix build-system meson))

(define-public tg-owt
  (let ((commit "fa86fcc00c218813d61a272a56feab55c76a1ab9")
        (revision "1"))
    (package
      (name "tg-owt")
      (version
       (git-version "0" revision commit))
      (source
       (origin
         (method git-fetch)
         (uri
          (git-reference
           (url "https://github.com/desktop-app/tg_owt.git")
           (commit commit)))
         (file-name
          (git-file-name name version))
         (sha256
          (base32 "06gcrlym6vqqw7zlds9lpwyg37d5m81d87h16aps19v0v9gzan0l"))
         (modules '((guix build utils)
                    (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))))
               #t)))))
      (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)))))
      (native-inputs
       `(("pkg-config" ,pkg-config)
         ("python" ,python-wrapper)
         ("yasm" ,yasm)))
      (inputs
       `(("alsa" ,alsa-lib)
         ("ffmpeg" ,ffmpeg)
         ("libjpeg" ,libjpeg-turbo)
         ("libvpx"
          ,(origin
             (method git-fetch)
             (uri
              (git-reference
               (url "https://chromium.googlesource.com/webm/libvpx")
               (commit "5b63f0f821e94f8072eb483014cfc33b05978bb9")))
             (file-name
              (git-file-name "libvpx-for-tg-owt" 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-tg-owt" version))
             (sha256
              (base32 "01knnk4h247rq536097n9n3s3brxlbby3nv3ppdgsqfda3k159ll"))))
         ("openssl" ,openssl)
         ("opus" ,opus)
         ("protobuf" ,protobuf)
         ("pulseaudio" ,pulseaudio)))
      (synopsis "WebRTC support for Telegram-Desktop")
      (description "Tg_owt is a custom WebRTC fork by Telegram project,
for its use in telegram desktop client.")
      (home-page "https://github.com/desktop-app/tg_owt")
      (license
       (list
        ;; Abseil-CPP
        license:asl2.0
        ;; LibYuv
        (license:non-copyleft "file:///src/third_party/libyuv/LICENSE")
        ;; OpenH264
        license:bsd-2
        ;; PFFFT
        (license:non-copyleft "file:///src/third_party/pffft/LICENSE")
        ;; RnNoise
        license:gpl3
        ;; LibSRTP, LibVPx, UsrSCTP and Others
        license:bsd-3)))))

(define-public tg-rlottie
  (let ((commit "cbd43984ebdf783e94c8303c41385bf82aa36d5b")
        (revision "1"))
    (package
      (name "tg-rlottie")
      (version
       (git-version "0" revision commit))
      (source
       (origin
         (method git-fetch)
         (uri
          (git-reference
           (url "https://github.com/desktop-app/rlottie.git")
           (commit commit)))
         (file-name
          (git-file-name name version))
         (sha256
          (base32 "1lxpbgbhps9rmck036mgmiknqrzpjxpas8n7qxykv6pwzn0c8n0c"))))
      (build-system meson-build-system)
      (arguments
       `(#:configure-flags
         (list
          "-Dlog=true"
          "-Ddumptree=true"
          "-Dtest=true")
         #:phases
         (modify-phases %standard-phases
           (add-after 'unpack 'patch-cxx-flags
             (lambda _
               (substitute* "meson.build"
                 (("werror=true")
                  "werror=false"))
               #t)))))
      (native-inputs
       `(("googletest" ,googletest)
         ("pkg-config" ,pkg-config)))
      (synopsis "Lottie Animation Library for Telegram-Desktop")
      (description "TG-Rlottie is a custom fork of rlottie, modified for its use
in telegram-desktop.  Rlottie is a platform independent standalone c++ library
for rendering vector based animations and art in realtime.")
      (home-page "https://github.com/desktop-app/rlottie")
      (license license:expat))))

(define-public tg-voip
  (package
    (name "tg-voip")
    (version "2.4.4")
    (source
     (origin
       (method git-fetch)
       (uri
        (git-reference
         (url "https://github.com/telegramdesktop/libtgvoip.git")
         (commit "37d98e984fd6fa389262307db826d52ab86c8241")))
       (file-name
        (git-file-name name version))
       (sha256
        (base32 "13dzvyq8p20nlhjihv18aj6y97czk07qdl0k6v81vp6mbwcldg7h"))))
    (build-system gnu-build-system)
    (arguments
     `(#:configure-flags
       (list
        "--disable-static"
        "--disable-dsp" ; FIXME
        "--enable-audio-callback"
        "--with-alsa"
        "--with-pulse")
       #:phases
       (modify-phases %standard-phases
         (add-after 'unpack 'patch-linkers
           (lambda _
             (substitute* "Makefile.am"
               (("\\$\\(CRYPTO_LIBS\\) \\$\\(OPUS_LIBS\\)")
                "$(CRYPTO_LIBS) $(OPUS_LIBS) $(ALSA_LIBS) $(PULSE_LIBS)"))
             (substitute* "tgvoip.pc.in"
               (("libcrypto opus")
                "libcrypto opus alsa libpulse"))
             #t)))))
    (native-inputs
     `(("autoconf" ,autoconf)
       ("automake" ,automake)
       ("libtool" ,libtool)
       ("pkg-config" ,pkg-config)))
    (inputs
     `(("alsa" ,alsa-lib)
       ("openssl" ,openssl)
       ("opus" ,opus)
       ("pulseaudio" ,pulseaudio)))
    (synopsis "Telegram VoIP Library")
    (description "Tg-VoIP is the VoIP library for Telegram Desktop application.")
    (home-page "https://github.com/telegramdesktop/libtgvoip")
    (license license:unlicense)))

debug log:

solving f47c82277c ...
found f47c82277c in https://yhetil.org/guix-patches/577c0bdc-7144-7c35-ff9e-74d5e7143a06@raghavgururajan.name/
found e518a8dcd3 in https://yhetil.org/guix-patches/577c0bdc-7144-7c35-ff9e-74d5e7143a06@raghavgururajan.name/
found 0fd47f4f5d in https://yhetil.org/guix-patches/577c0bdc-7144-7c35-ff9e-74d5e7143a06@raghavgururajan.name/ ||
	https://yhetil.org/guix-patches/c24455fe6aaecdf522e03cd4bc57efc9b08fc1e5.camel@student.tugraz.at/ ||
	https://yhetil.org/guix-patches/5b7bbe10360a9a6bec44c99ac66b0e075f3ed924.camel@student.tugraz.at/ ||
	https://yhetil.org/guix-patches/e94f884e-e9d5-9e18-d5fc-dfec72145b67@raghavgururajan.name/ ||
	https://yhetil.org/guix-patches/c308f63543a805b4212f920cb845dee29b6b762f.camel@student.tugraz.at/ ||
	https://yhetil.org/guix-patches/d7b8c1f2-72b7-8c0c-42b0-e22e9619d827@raghavgururajan.name/ ||
	https://yhetil.org/guix-patches/fabb85ec-d833-4eba-a6ee-9f6151b8df52@raghavgururajan.name/

applying [1/3] https://yhetil.org/guix-patches/577c0bdc-7144-7c35-ff9e-74d5e7143a06@raghavgururajan.name/
diff --git a/gnu/packages/telegram.scm b/gnu/packages/telegram.scm
new file mode 100644
index 0000000000..0fd47f4f5d

Checking patch gnu/packages/telegram.scm...
Applied patch gnu/packages/telegram.scm cleanly.

skipping https://yhetil.org/guix-patches/c24455fe6aaecdf522e03cd4bc57efc9b08fc1e5.camel@student.tugraz.at/ for 0fd47f4f5d
skipping https://yhetil.org/guix-patches/5b7bbe10360a9a6bec44c99ac66b0e075f3ed924.camel@student.tugraz.at/ for 0fd47f4f5d
skipping https://yhetil.org/guix-patches/e94f884e-e9d5-9e18-d5fc-dfec72145b67@raghavgururajan.name/ for 0fd47f4f5d
skipping https://yhetil.org/guix-patches/c308f63543a805b4212f920cb845dee29b6b762f.camel@student.tugraz.at/ for 0fd47f4f5d
skipping https://yhetil.org/guix-patches/d7b8c1f2-72b7-8c0c-42b0-e22e9619d827@raghavgururajan.name/ for 0fd47f4f5d
skipping https://yhetil.org/guix-patches/fabb85ec-d833-4eba-a6ee-9f6151b8df52@raghavgururajan.name/ for 0fd47f4f5d
index at:
100644 0fd47f4f5df5f018da1fa3e975cd789612a0394c	gnu/packages/telegram.scm

applying [2/3] https://yhetil.org/guix-patches/577c0bdc-7144-7c35-ff9e-74d5e7143a06@raghavgururajan.name/
diff --git a/gnu/packages/telegram.scm b/gnu/packages/telegram.scm
index 0fd47f4f5d..e518a8dcd3 100644


applying [3/3] https://yhetil.org/guix-patches/577c0bdc-7144-7c35-ff9e-74d5e7143a06@raghavgururajan.name/
diff --git a/gnu/packages/telegram.scm b/gnu/packages/telegram.scm
index e518a8dcd3..f47c82277c 100644

Checking patch gnu/packages/telegram.scm...
Applied patch gnu/packages/telegram.scm cleanly.
Checking patch gnu/packages/telegram.scm...
Applied patch gnu/packages/telegram.scm cleanly.

index at:
100644 f47c82277cc21e922ff7061c5203bddb989f7334	gnu/packages/telegram.scm

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).