nongnu: anydesk: Update to 6.3.2-1.

* nongnu/packages/anydesk.scm (anydesk): Update to 6.3.2-1.
[source]: Update uri.
[arguments]: <#:patchelf-plan>: Adjust binary path.
<#:install-plan>: Adjust source file paths.
<#:phases>: Replace 'binary-unpack' phase with one that handles the source .deb file properly.
Adjust 'install-desktop-entry' phase to find source files.

Signed-off-by: Jonathan Brielmaier <jonathan.brielmaier@web.de>
This commit is contained in:
Ada Stevenson 2024-07-20 14:26:40 +08:00 committed by Jonathan Brielmaier
parent a6d95345e0
commit 7a44d01a7f
No known key found for this signature in database
GPG key ID: ECFC83988B4E4B9F

View file

@ -21,20 +21,20 @@
(define-public anydesk
(package
(name "anydesk")
(version "6.3.0")
(version "6.3.2-1")
(source (origin
(method url-fetch)
(uri (string-append "https://download.anydesk.com/linux/anydesk-"
version "-amd64.tar.gz"))
(uri (string-append "https://download.anydesk.com/linux/anydesk_"
version "_amd64.deb"))
(sha256
(base32
"0lp4zvbdriwbzfnvblbbpzxsrs0l425rha9qjs9sy6ff6myk7qxi"))))
"13b5ab4a889vz39d36f45mhv3mlaxb305wsh3plk3dbjcrkkkirb"))))
(build-system binary-build-system)
(arguments
`(#:validate-runpath? #f
#:strip-binaries? #f ;; For some reason it breaks the program
#:patchelf-plan
`(("anydesk" ("atk"
`(("usr/bin/anydesk" ("atk"
"cairo"
"fontconfig"
"freetype"
@ -66,17 +66,29 @@
"polkit-gnome"
"pulseaudio")))
#:install-plan
`(("anydesk" "/bin/")
("polkit-1/com.anydesk.anydesk.policy" "/etc/polkit-1/actions/")
("icons/" "/share/icons/"))
`(("usr/bin/anydesk" "/bin/")
("usr/share/polkit-1/actions/com.anydesk.anydesk.policy" "/etc/polkit-1/actions/")
("usr/share/icons" "/share/icons/"))
#:phases
(modify-phases %standard-phases
(replace 'unpack
(lambda* (#:key inputs #:allow-other-keys)
(invoke "tar" "-xvzf" (assoc-ref inputs "source") "--strip-components" "1")))
(replace 'binary-unpack
(lambda* (#:key source #:allow-other-keys)
(let* ((files (filter (lambda (f)
(not (string=? (basename f) "environment-variables")))
(find-files (getcwd))))
(binary-file (car files)))
(when (= 1 (length files))
(mkdir "binary")
(chdir "binary")
(invoke "ar" "x" binary-file)
(invoke "tar" "xvf" "data.tar.gz")
(invoke "rm" "-rfv" "control.tar.gz"
"data.tar.gz"
binary-file
"debian-binary")))))
(add-after 'wrap-program 'install-desktop-entry
(lambda* (#:key outputs #:allow-other-keys)
(let* ((desktop-file "anydesk.desktop")
(let* ((desktop-file "usr/share/applications/anydesk.desktop")
(out (assoc-ref outputs "out"))
(applications (string-append out "/share/applications")))
(substitute* desktop-file