From 9a0253ae893aca6d3363bd5ad9158b4dc2fbfa98 Mon Sep 17 00:00:00 2001 From: Giacomo Leidi Date: Thu, 21 Sep 2023 02:37:54 +0200 Subject: [PATCH] nongnu: element-desktop: Avoid manually unpacking .deb file. * nongnu/packages/messaging.scm (element-desktop)[phases]: Replace with 'setup-cwd; : there's no need anymore to care about the environment-variables file; [native-inputs]: drop tar. Signed-off-by: Jonathan Brielmaier --- nongnu/packages/messaging.scm | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/nongnu/packages/messaging.scm b/nongnu/packages/messaging.scm index 35ebb49..2fe5f15 100644 --- a/nongnu/packages/messaging.scm +++ b/nongnu/packages/messaging.scm @@ -54,25 +54,19 @@ #~'("lib/Element/element-desktop") #:phases #~(modify-phases %standard-phases - (replace 'unpack + (add-after 'binary-unpack 'setup-cwd (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") ;; Fix the .desktop file binary location. (substitute* '("share/applications/element-desktop.desktop") (("/opt/Element/") (string-append #$output "/bin/"))))) - (add-after 'install 'symlink-binary-file-and-cleanup + (add-after 'install 'symlink-binary-file (lambda _ - (delete-file (string-append #$output "/environment-variables")) (mkdir-p (string-append #$output "/bin")) (symlink (string-append #$output "/lib/Element/element-desktop") (string-append #$output "/bin/element-desktop")))) @@ -84,8 +78,6 @@ (list (string-append #$output "/lib/Element")) ":"))))))))) - - (native-inputs (list tar)) (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