From 3de7b705c0bc28db745ef789bf5a26e9217d79e2 Mon Sep 17 00:00:00 2001 From: John Kehayias Date: Fri, 7 Oct 2022 11:21:00 -0400 Subject: nongnu: Add zoom. * nongnu/packages/messaging.scm (zoom): New variable. --- nongnu/packages/messaging.scm | 165 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 165 insertions(+) diff --git a/nongnu/packages/messaging.scm b/nongnu/packages/messaging.scm index 4cb3768..f1f23cc 100644 --- a/nongnu/packages/messaging.scm +++ b/nongnu/packages/messaging.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2021, 2022 PantherX OS Team ;;; Copyright © 2022 John Kehayias +;;; Copyright © 2022 Evgenii Lepikhin ;;; ;;; This file is not part of GNU Guix. ;;; @@ -20,6 +21,7 @@ (define-module (nongnu packages messaging) #:use-module (gnu packages base) + #:use-module (gnu packages bash) #:use-module (gnu packages compression) #:use-module (gnu packages cups) #:use-module (gnu packages databases) @@ -32,6 +34,7 @@ #:use-module (gnu packages linux) #:use-module (gnu packages nss) #:use-module (gnu packages pulseaudio) + #:use-module (gnu packages qt) #:use-module (gnu packages xdisorg) #:use-module (gnu packages xml) #:use-module (gnu packages xorg) @@ -41,6 +44,7 @@ #:use-module (guix utils) #:use-module ((guix licenses) :prefix license:) #:use-module (nonguix build-system binary) + #:use-module ((nonguix licenses) :prefix license:) #:use-module (ice-9 match)) (define-public element-desktop @@ -277,3 +281,164 @@ or iOS.") (properties '((release-monitoring-url . "https://github.com/signalapp/Signal-Desktop/releases"))) (license license:agpl3))) + +(define-public zoom + (package + (name "zoom") + (version "5.12.0.4682") + (source + (origin + (method url-fetch) + (uri (string-append "https://cdn.zoom.us/prod/" version "/zoom_x86_64.tar.xz")) + (sha256 + (base32 "1a7mljmh23ndnssfsnlj549a8m0cs50m2fw3ii8kyy790n4r5d9h")))) + (supported-systems '("x86_64-linux")) + (build-system binary-build-system) + (arguments + (list #:validate-runpath? #f ; TODO: fails on wrapped binary and included other files + #:patchelf-plan + #~(let ((libs '("alsa-lib" + "at-spi2-atk" + "at-spi2-core" + "atk" + "cairo" + "cups" + "dbus" + "eudev" + "expat" + "fontconfig-minimal" + "gcc" + "glib" + "gtk+" + "libdrm" + "libx11" + "libxcb" + "libxcomposite" + "libxcursor" + "libxdamage" + "libxext" + "libxfixes" + "libxi" + "libxkbcommon" + "libxkbfile" + "libxrandr" + "libxshmfence" + "libxtst" + "mesa" + "nspr" + "pango" + "pulseaudio" + "xcb-util-image" + "xcb-util-keysyms" + "zlib"))) + `(("lib/zoom/ZoomLauncher" + ,libs) + ("lib/zoom/zoom" + ,libs))) + #:phases + #~(modify-phases %standard-phases + (replace 'unpack + (lambda _ + (invoke "tar" "xvf" #$source) + ;; Use the more standard lib directory for everything. + (mkdir-p "lib") + (rename-file "zoom/" "lib/zoom"))) + (add-after 'install 'wrap-where-patchelf-does-not-work + (lambda _ + (wrap-program (string-append #$output "/lib/zoom/zoom") + `("LD_LIBRARY_PATH" prefix + ,(list (string-append #$(this-package-input "nss") "/lib/nss") + #$@(map (lambda (pkg) + (file-append (this-package-input pkg) "/lib")) + '("alsa-lib" + "atk" + "at-spi2-atk" + "at-spi2-core" + "cairo" + "cups" + "dbus" + "eudev" + "expat" + "gcc" + "glib" + "mesa" + "nspr" + "libxcomposite" + "libxdamage" + "libxkbcommon" + "libxkbfile" + "libxrandr" + "libxshmfence" + "pango" + "pulseaudio" + "zlib"))))))) + (add-after 'wrap-where-patchelf-does-not-work 'symlink-binaries + (lambda _ + (delete-file (string-append #$output "/environment-variables")) + (mkdir-p (string-append #$output "/bin")) + (symlink (string-append #$output "/lib/zoom/zoom") + (string-append #$output "/bin/zoom")) + (symlink (string-append #$output "/lib/zoom/ZoomLauncher") + (string-append #$output "/bin/ZoomLauncher")))) + (add-after 'symlink-binaries 'create-desktop-file + (lambda _ + (let ((apps (string-append #$output "/share/applications"))) + (mkdir-p apps) + (make-desktop-entry-file + (string-append apps "/zoom.desktop") + #:name "Zoom" + #:generic-name "Zoom Client for Linux" + #:exec (string-append #$output "/bin/ZoomLauncher %U") + #:mime-type (list + "x-scheme-handler/zoommtg" + "x-scheme-handler/zoomus" + "x-scheme-handler/tel" + "x-scheme-handler/callto" + "x-scheme-handler/zoomphonecall" + "application/x-zoom") + #:categories '("Network" "InstantMessaging" + "VideoConference" "Telephony") + #:startup-w-m-class "zoom" + #:comment + '(("en" "Zoom Video Conference") + (#f "Zoom Video Conference"))))))))) + (native-inputs (list tar)) + (inputs (list alsa-lib + at-spi2-atk + at-spi2-core + atk + bash-minimal + cairo + cups + dbus + eudev + expat + fontconfig + `(,gcc "lib") + glib + gtk+ + libdrm + librsvg + libx11 + libxcb + libxcomposite + libxdamage + libxext + libxfixes + libxkbcommon + libxkbfile + libxrandr + libxshmfence + mesa + nspr + nss + pango + pulseaudio + qtmultimedia + xcb-util-image + xcb-util-keysyms + zlib)) + (home-page "https://zoom.us/") + (synopsis "Video conference client") + (description "The Zoom video conferencing and messaging client.") + (license (license:nonfree "https://explore.zoom.us/en/terms/")))) -- cgit v1.2.3