diff options
author | msglm <msglm@techchud.xyz> | 2024-05-20 16:31:58 -0500 |
---|---|---|
committer | msglm <msglm@techchud.xyz> | 2024-05-20 16:31:58 -0500 |
commit | 103e3bf5556bfa17aaffee356205955f80f3eb45 (patch) | |
tree | b638f645651be2c6d2d11ecbabc897867bada225 | |
parent | b6d76454c209cdf841d3f9940e63e88daca615ad (diff) | |
download | guix-msglm-103e3bf5556bfa17aaffee356205955f80f3eb45.tar.gz guix-msglm-103e3bf5556bfa17aaffee356205955f80f3eb45.tar.bz2 guix-msglm-103e3bf5556bfa17aaffee356205955f80f3eb45.zip |
Revert "dropping support for session package"
This reverts commit bd0f383b5720d198d815ffdfa361d5356ee14e89.
-rw-r--r-- | session-desktop.scm | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/session-desktop.scm b/session-desktop.scm new file mode 100644 index 0000000..e3220d5 --- /dev/null +++ b/session-desktop.scm @@ -0,0 +1,84 @@ +(define-module (session-desktop) + #:use-module (gnu packages base) + #:use-module (gnu packages bash) + #: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) + #:use-module (gnu packages kerberos) + #: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) + #:use-module (nonguix build-system binary) + #:use-module (nonguix build-system chromium-binary) + #:use-module (nonguix licenses) + #:use-module (ice-9 match)) + +(define-public session-desktop + (package + (name "session-desktop") + (version "1.11.4") + (source + (origin + (method url-fetch) + (uri + (string-append + "https://github.com/oxen-io/" name "/releases/download/v" version "/" name "-linux-amd64-" version ".deb")) + (sha256 + (base32 "1yfagz54gvx0nw70pwfqasfiv6b806kjz0jdllrr701fvaf815a9")))) + (supported-systems '("x86_64-linux")) + (build-system chromium-binary-build-system) + (arguments + (list #:validate-runpath? #f ; TODO: fails on wrapped binary and included other files + #:wrapper-plan + #~'("lib/Session/session-desktop") + #:phases + #~(modify-phases %standard-phases + (replace 'unpack + (lambda _ + (invoke "ar" "x" #$source) + (invoke "tar" "xvf" "data.tar.xz") + (copy-recursively "usr/" ".") + ;; Use the more standard lib directory for everything. + (rename-file "opt/" "lib") + ;; Remove unneeded files. + (delete-file-recursively "usr") + (delete-file "control.tar.gz") + (delete-file "data.tar.xz") + (delete-file "debian-binary") + (delete-file "environment-variables") + ;; Fix the .desktop file binary location. + (substitute* '("share/applications/session-desktop.desktop") + (("/opt/Session/") + (string-append #$output "/bin/"))))) + (add-after 'install 'symlink-binary-file-and-cleanup + (lambda _ + (delete-file (string-append #$output "/environment-variables")) + (mkdir-p (string-append #$output "/bin")) + (symlink (string-append #$output "/lib/Session/session-desktop") + (string-append #$output "/bin/session-desktop")))) + (add-after 'install-wrapper 'wrap-where-patchelf-does-not-work + (lambda _ + (wrap-program (string-append #$output "/lib/Session/session-desktop") + `("LD_LIBRARY_PATH" ":" prefix + (,(string-join + (list + (string-append #$output "/lib/Session")) + ":"))))))))) + (native-inputs (list tar)) + (home-page "https://getsession.org/") + (synopsis "Session Desktop - Onion routing based messenger") + (description "Session integrates directly with Oxen Service Nodes, which are a set of distributed, decentralized and Sybil resistant nodes. Service Nodes act as servers which store messages offline, and a set of nodes which allow for onion routing functionality obfuscating users IP Addresses. For a full understanding of how Session works, read the Session Whitepaper.") + (license gpl3))) |