2022-12-19 17:17:39 +01:00
|
|
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
2022-09-29 20:36:15 +02:00
|
|
|
;;; Copyright © 2021, 2022 PantherX OS Team <team@pantherx.org>
|
2024-01-31 21:25:15 +01:00
|
|
|
;;; Copyright © 2022, 2023, 2024 John Kehayias <john.kehayias@protonmail.com>
|
2022-10-13 20:55:24 +02:00
|
|
|
;;; Copyright © 2022 Evgenii Lepikhin <johnlepikhin@gmail.com>
|
2023-05-19 16:26:12 +02:00
|
|
|
;;; Copyright © 2023 Giacomo Leidi <goodoldpaul@autistici.org>
|
2023-07-26 21:06:29 +02:00
|
|
|
;;; Copyright © 2023 Raven Hallsby <karl@hallsby.org>
|
2022-09-29 20:36:15 +02:00
|
|
|
|
|
|
|
(define-module (nongnu packages messaging)
|
|
|
|
#:use-module (gnu packages base)
|
2022-10-13 20:55:24 +02:00
|
|
|
#:use-module (gnu packages bash)
|
2022-09-29 20:36:15 +02:00
|
|
|
#:use-module (gnu packages compression)
|
|
|
|
#:use-module (gnu packages cups)
|
|
|
|
#:use-module (gnu packages fontutils)
|
|
|
|
#:use-module (gnu packages gcc)
|
|
|
|
#:use-module (gnu packages gl)
|
|
|
|
#:use-module (gnu packages glib)
|
|
|
|
#:use-module (gnu packages gnome)
|
|
|
|
#:use-module (gnu packages gtk)
|
2023-03-17 20:11:38 +01:00
|
|
|
#:use-module (gnu packages kerberos)
|
2022-09-29 20:36:15 +02:00
|
|
|
#:use-module (gnu packages linux)
|
|
|
|
#:use-module (gnu packages nss)
|
|
|
|
#:use-module (gnu packages pulseaudio)
|
|
|
|
#:use-module (gnu packages xdisorg)
|
|
|
|
#:use-module (gnu packages xml)
|
|
|
|
#:use-module (gnu packages xorg)
|
|
|
|
#:use-module (guix download)
|
|
|
|
#:use-module (guix gexp)
|
|
|
|
#:use-module (guix packages)
|
|
|
|
#:use-module (guix utils)
|
|
|
|
#:use-module ((guix licenses) :prefix license:)
|
|
|
|
#:use-module (nonguix build-system binary)
|
2023-05-19 16:26:12 +02:00
|
|
|
#:use-module (nonguix build-system chromium-binary)
|
2022-10-13 20:55:24 +02:00
|
|
|
#:use-module ((nonguix licenses) :prefix license:)
|
2022-09-29 20:36:15 +02:00
|
|
|
#:use-module (ice-9 match))
|
|
|
|
|
|
|
|
(define-public element-desktop
|
|
|
|
(package
|
|
|
|
(name "element-desktop")
|
2024-09-14 21:52:00 +02:00
|
|
|
(version "1.11.77")
|
2022-09-29 20:36:15 +02:00
|
|
|
(source
|
|
|
|
(origin
|
|
|
|
(method url-fetch)
|
|
|
|
(uri
|
|
|
|
(string-append
|
|
|
|
"https://packages.riot.im/debian/pool/main/e/" name "/" name "_" version
|
|
|
|
"_amd64.deb"))
|
|
|
|
(sha256
|
2024-09-14 21:52:00 +02:00
|
|
|
(base32 "1q70k071dn5vpqyimjaawlycbvd1q888arzy3xby1viwq20scg6x"))))
|
2022-09-29 20:36:15 +02:00
|
|
|
(supported-systems '("x86_64-linux"))
|
2023-05-19 16:26:12 +02:00
|
|
|
(build-system chromium-binary-build-system)
|
2022-09-29 20:36:15 +02:00
|
|
|
(arguments
|
|
|
|
(list #:validate-runpath? #f ; TODO: fails on wrapped binary and included other files
|
2023-05-19 16:26:12 +02:00
|
|
|
#:wrapper-plan
|
|
|
|
#~'("lib/Element/element-desktop")
|
2022-09-29 20:36:15 +02:00
|
|
|
#:phases
|
|
|
|
#~(modify-phases %standard-phases
|
2023-09-21 02:37:54 +02:00
|
|
|
(add-after 'binary-unpack 'setup-cwd
|
2022-09-29 20:36:15 +02:00
|
|
|
(lambda _
|
|
|
|
(copy-recursively "usr/" ".")
|
|
|
|
;; Use the more standard lib directory for everything.
|
|
|
|
(rename-file "opt/" "lib")
|
|
|
|
;; Remove unneeded files.
|
|
|
|
(delete-file-recursively "usr")
|
|
|
|
;; Fix the .desktop file binary location.
|
|
|
|
(substitute* '("share/applications/element-desktop.desktop")
|
|
|
|
(("/opt/Element/")
|
2023-08-06 18:42:06 +02:00
|
|
|
(string-append #$output "/bin/")))))
|
2023-09-21 02:37:54 +02:00
|
|
|
(add-after 'install 'symlink-binary-file
|
2022-09-29 20:36:15 +02:00
|
|
|
(lambda _
|
|
|
|
(mkdir-p (string-append #$output "/bin"))
|
|
|
|
(symlink (string-append #$output "/lib/Element/element-desktop")
|
|
|
|
(string-append #$output "/bin/element-desktop"))))
|
2023-05-19 16:26:12 +02:00
|
|
|
(add-after 'install-wrapper 'wrap-where-patchelf-does-not-work
|
2022-09-29 20:36:15 +02:00
|
|
|
(lambda _
|
|
|
|
(wrap-program (string-append #$output "/lib/Element/element-desktop")
|
|
|
|
`("LD_LIBRARY_PATH" ":" prefix
|
|
|
|
(,(string-join
|
|
|
|
(list
|
2023-05-19 16:26:12 +02:00
|
|
|
(string-append #$output "/lib/Element"))
|
2022-09-29 20:36:15 +02:00
|
|
|
":")))))))))
|
|
|
|
(home-page "https://github.com/vector-im/element-desktop")
|
|
|
|
(synopsis "Matrix collaboration client for desktop")
|
|
|
|
(description "Element Desktop is a Matrix client for desktop with Element Web at
|
|
|
|
its core.")
|
|
|
|
;; not working?
|
|
|
|
(properties
|
|
|
|
'((release-monitoring-url . "https://github.com/vector-im/element-desktop/releases")))
|
|
|
|
(license license:asl2.0)))
|
2022-09-29 20:37:22 +02:00
|
|
|
|
|
|
|
(define-public signal-desktop
|
|
|
|
(package
|
|
|
|
(name "signal-desktop")
|
2024-10-11 17:29:56 +02:00
|
|
|
(version "7.28.0")
|
2022-09-29 20:37:22 +02:00
|
|
|
(source
|
|
|
|
(origin
|
|
|
|
(method url-fetch)
|
|
|
|
(uri
|
|
|
|
(string-append
|
2023-07-13 10:22:00 +02:00
|
|
|
"https://updates.signal.org/desktop/apt/pool/s/" name "/" name "_" version
|
2022-09-29 20:37:22 +02:00
|
|
|
"_amd64.deb"))
|
|
|
|
(sha256
|
2024-10-11 17:29:56 +02:00
|
|
|
(base32 "08mvwd8qalz8495l2gxjy8lgsgnfwfb2hap2sfn9v5f8ngy9ngkn"))))
|
2022-09-29 20:37:22 +02:00
|
|
|
(supported-systems '("x86_64-linux"))
|
2023-05-19 18:27:03 +02:00
|
|
|
(build-system chromium-binary-build-system)
|
2022-09-29 20:37:22 +02:00
|
|
|
(arguments
|
|
|
|
(list #:validate-runpath? #f ; TODO: fails on wrapped binary and included other files
|
2023-05-19 18:27:03 +02:00
|
|
|
#:wrapper-plan
|
|
|
|
#~'("lib/Signal/signal-desktop")
|
2022-09-29 20:37:22 +02:00
|
|
|
#:phases
|
|
|
|
#~(modify-phases %standard-phases
|
2023-09-21 02:34:15 +02:00
|
|
|
(add-after 'binary-unpack 'setup-cwd
|
2022-09-29 20:37:22 +02:00
|
|
|
(lambda _
|
|
|
|
(copy-recursively "usr/" ".")
|
|
|
|
;; Use the more standard lib directory for everything.
|
|
|
|
(rename-file "opt/" "lib")
|
|
|
|
;; Remove unneeded files.
|
|
|
|
(delete-file-recursively "usr")
|
|
|
|
;; Fix the .desktop file binary location.
|
|
|
|
(substitute* '("share/applications/signal-desktop.desktop")
|
|
|
|
(("/opt/Signal/")
|
2023-08-06 18:27:22 +02:00
|
|
|
(string-append #$output "/bin/")))))
|
2023-09-21 02:34:15 +02:00
|
|
|
(add-after 'install 'symlink-binary-file
|
2022-09-29 20:37:22 +02:00
|
|
|
(lambda _
|
|
|
|
(mkdir-p (string-append #$output "/bin"))
|
|
|
|
(symlink (string-append #$output "/lib/Signal/signal-desktop")
|
|
|
|
(string-append #$output "/bin/signal-desktop"))))
|
2023-05-19 18:27:03 +02:00
|
|
|
(add-after 'install-wrapper 'wrap-where-patchelf-does-not-work
|
2022-09-29 20:37:22 +02:00
|
|
|
(lambda _
|
|
|
|
(wrap-program (string-append #$output "/lib/Signal/signal-desktop")
|
|
|
|
`("LD_LIBRARY_PATH" ":" prefix
|
|
|
|
(,(string-join
|
|
|
|
(list
|
2023-05-19 18:27:03 +02:00
|
|
|
(string-append #$output "/lib/Signal"))
|
2022-09-29 20:37:22 +02:00
|
|
|
":")))))))))
|
|
|
|
(home-page "https://signal.org/")
|
|
|
|
(synopsis "Private messenger using the Signal protocol")
|
|
|
|
(description "Signal Desktop is an Electron application that links with Signal on Android
|
|
|
|
or iOS.")
|
|
|
|
;; doesn't work?
|
|
|
|
(properties
|
|
|
|
'((release-monitoring-url . "https://github.com/signalapp/Signal-Desktop/releases")))
|
|
|
|
(license license:agpl3)))
|
2022-10-13 20:55:24 +02:00
|
|
|
|
|
|
|
(define-public zoom
|
|
|
|
(package
|
|
|
|
(name "zoom")
|
2024-02-14 22:36:06 +01:00
|
|
|
(version "5.17.5.2543")
|
2022-10-13 20:55:24 +02:00
|
|
|
(source
|
|
|
|
(origin
|
|
|
|
(method url-fetch)
|
|
|
|
(uri (string-append "https://cdn.zoom.us/prod/" version "/zoom_x86_64.tar.xz"))
|
|
|
|
(file-name (string-append name "-" version "-x86_64.tar.xz"))
|
|
|
|
(sha256
|
2024-02-14 22:36:06 +01:00
|
|
|
(base32 "06m53d3jrpiq1z5wd7m61lb3w8m8g72iaqx5sixnzn290gyyzgim"))))
|
2022-10-13 20:55:24 +02:00
|
|
|
(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
|
2023-03-17 20:11:38 +01:00
|
|
|
;; Note: it seems like some (all?) of these only do anything in
|
|
|
|
;; LD_LIBRARY_PATH, or at least needed there as well.
|
2022-10-13 20:55:24 +02:00
|
|
|
#~(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)
|
|
|
|
("lib/zoom/zopen"
|
2023-03-17 20:25:55 +01:00
|
|
|
,libs)
|
|
|
|
("lib/zoom/aomhost"
|
2022-10-13 20:55:24 +02:00
|
|
|
,libs)))
|
|
|
|
#:phases
|
|
|
|
#~(modify-phases %standard-phases
|
|
|
|
(replace 'unpack
|
2024-10-28 12:28:43 +01:00
|
|
|
(lambda* (#:key source #:allow-other-keys)
|
|
|
|
(invoke "tar" "xvf" source)
|
2022-10-13 20:55:24 +02:00
|
|
|
;; 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/zopen")
|
|
|
|
`("LD_LIBRARY_PATH" prefix
|
|
|
|
,(list #$@(map (lambda (pkg)
|
|
|
|
(file-append (this-package-input pkg) "/lib"))
|
|
|
|
'("fontconfig-minimal"
|
|
|
|
"freetype"
|
|
|
|
"gcc"
|
|
|
|
"glib"
|
|
|
|
"libxcomposite"
|
|
|
|
"libxdamage"
|
|
|
|
"libxkbcommon"
|
|
|
|
"libxkbfile"
|
|
|
|
"libxrandr"
|
|
|
|
"libxrender"
|
|
|
|
"zlib")))))
|
|
|
|
(wrap-program (string-append #$output "/lib/zoom/zoom")
|
2024-01-04 19:55:36 +01:00
|
|
|
'("QML2_IMPORT_PATH" = ())
|
|
|
|
'("QT_PLUGIN_PATH" = ())
|
|
|
|
'("QT_SCREEN_SCALE_FACTORS" = ())
|
2023-03-17 20:25:55 +01:00
|
|
|
`("FONTCONFIG_PATH" ":" prefix
|
|
|
|
(,(string-join
|
|
|
|
(list
|
|
|
|
(string-append #$(this-package-input "fontconfig-minimal") "/etc/fonts")
|
|
|
|
#$output)
|
|
|
|
":")))
|
|
|
|
`("LD_LIBRARY_PATH" prefix
|
|
|
|
,(list (string-append #$(this-package-input "nss") "/lib/nss")
|
|
|
|
#$@(map (lambda (pkg)
|
|
|
|
(file-append (this-package-input pkg) "/lib"))
|
|
|
|
;; TODO: Reuse this long list as it is
|
|
|
|
;; needed for aomhost. Or perhaps
|
|
|
|
;; aomhost has a shorter needed list,
|
|
|
|
;; but untested.
|
|
|
|
'("alsa-lib"
|
|
|
|
"atk"
|
|
|
|
"at-spi2-atk"
|
|
|
|
"at-spi2-core"
|
|
|
|
"cairo"
|
|
|
|
"cups"
|
|
|
|
"dbus"
|
|
|
|
"eudev"
|
|
|
|
"expat"
|
|
|
|
"gcc"
|
|
|
|
"glib"
|
|
|
|
"mesa"
|
|
|
|
"mit-krb5"
|
|
|
|
"nspr"
|
|
|
|
"libxcb"
|
|
|
|
"libxcomposite"
|
|
|
|
"libxdamage"
|
|
|
|
"libxext"
|
|
|
|
"libxkbcommon"
|
|
|
|
"libxkbfile"
|
|
|
|
"libxrandr"
|
|
|
|
"libxshmfence"
|
|
|
|
"pango"
|
|
|
|
"pulseaudio"
|
|
|
|
"xcb-util"
|
2023-07-26 21:06:29 +02:00
|
|
|
"xcb-util-image"
|
|
|
|
"xcb-util-keysyms"
|
2023-03-17 20:25:55 +01:00
|
|
|
"xcb-util-wm"
|
|
|
|
"xcb-util-renderutil"
|
|
|
|
"zlib")))))
|
|
|
|
(wrap-program (string-append #$output "/lib/zoom/aomhost")
|
2022-10-13 20:55:24 +02:00
|
|
|
`("FONTCONFIG_PATH" ":" prefix
|
|
|
|
(,(string-join
|
|
|
|
(list
|
|
|
|
(string-append #$(this-package-input "fontconfig-minimal") "/etc/fonts")
|
|
|
|
#$output)
|
|
|
|
":")))
|
|
|
|
`("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"
|
2023-03-17 20:11:38 +01:00
|
|
|
"mit-krb5"
|
2022-10-13 20:55:24 +02:00
|
|
|
"nspr"
|
2023-03-17 20:11:38 +01:00
|
|
|
"libxcb"
|
2022-10-13 20:55:24 +02:00
|
|
|
"libxcomposite"
|
|
|
|
"libxdamage"
|
2023-03-17 20:11:38 +01:00
|
|
|
"libxext"
|
2022-10-13 20:55:24 +02:00
|
|
|
"libxkbcommon"
|
|
|
|
"libxkbfile"
|
|
|
|
"libxrandr"
|
|
|
|
"libxshmfence"
|
|
|
|
"pango"
|
|
|
|
"pulseaudio"
|
2023-03-17 20:11:38 +01:00
|
|
|
"xcb-util"
|
2023-07-26 21:06:29 +02:00
|
|
|
"xcb-util-image"
|
|
|
|
"xcb-util-keysyms"
|
2023-03-17 20:11:38 +01:00
|
|
|
"xcb-util-wm"
|
|
|
|
"xcb-util-renderutil"
|
2022-10-13 20:55:24 +02:00
|
|
|
"zlib")))))))
|
2022-10-14 19:23:57 +02:00
|
|
|
(add-after 'wrap-where-patchelf-does-not-work 'rename-binary
|
|
|
|
;; IPC (for single sign-on and handling links) fails if the
|
|
|
|
;; name does not end in "zoom," so rename the real binary.
|
|
|
|
;; Thanks to the Nix packagers for figuring this out.
|
|
|
|
(lambda _
|
|
|
|
(rename-file (string-append #$output "/lib/zoom/.zoom-real")
|
|
|
|
(string-append #$output "/lib/zoom/.zoom"))
|
|
|
|
(substitute* (string-append #$output "/lib/zoom/zoom")
|
|
|
|
(("zoom-real")
|
|
|
|
"zoom"))))
|
|
|
|
(add-after 'rename-binary 'symlink-binaries
|
2022-10-13 20:55:24 +02:00
|
|
|
(lambda _
|
|
|
|
(delete-file (string-append #$output "/environment-variables"))
|
|
|
|
(mkdir-p (string-append #$output "/bin"))
|
2023-03-17 20:25:55 +01:00
|
|
|
(symlink (string-append #$output "/lib/zoom/aomhost")
|
|
|
|
(string-append #$output "/bin/aomhost"))
|
2022-10-13 20:55:24 +02:00
|
|
|
(symlink (string-append #$output "/lib/zoom/zoom")
|
|
|
|
(string-append #$output "/bin/zoom"))
|
|
|
|
(symlink (string-append #$output "/lib/zoom/zopen")
|
|
|
|
(string-append #$output "/bin/zopen"))
|
|
|
|
(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
|
|
|
|
freetype
|
|
|
|
`(,gcc "lib")
|
|
|
|
glib
|
|
|
|
gtk+
|
|
|
|
libdrm
|
|
|
|
librsvg
|
|
|
|
libx11
|
|
|
|
libxcb
|
|
|
|
libxcomposite
|
|
|
|
libxdamage
|
|
|
|
libxext
|
|
|
|
libxfixes
|
|
|
|
libxkbcommon
|
|
|
|
libxkbfile
|
|
|
|
libxrandr
|
|
|
|
libxrender
|
|
|
|
libxshmfence
|
|
|
|
mesa
|
2023-03-17 20:11:38 +01:00
|
|
|
mit-krb5
|
2022-10-13 20:55:24 +02:00
|
|
|
nspr
|
|
|
|
nss
|
|
|
|
pango
|
|
|
|
pulseaudio
|
2023-03-17 20:11:38 +01:00
|
|
|
xcb-util
|
2022-10-13 20:55:24 +02:00
|
|
|
xcb-util-image
|
|
|
|
xcb-util-keysyms
|
2023-03-17 20:11:38 +01:00
|
|
|
xcb-util-renderutil
|
|
|
|
xcb-util-wm
|
2022-10-13 20:55:24 +02:00
|
|
|
zlib))
|
|
|
|
(home-page "https://zoom.us/")
|
|
|
|
(synopsis "Video conference client")
|
|
|
|
(description "The Zoom video conferencing and messaging client. Zoom must be run via an
|
|
|
|
app launcher to use its .desktop file, or with @code{ZoomLauncher}.")
|
|
|
|
(license (license:nonfree "https://explore.zoom.us/en/terms/"))))
|