summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormsglm <msglm@techchud.xyz>2023-12-17 23:46:53 -0600
committermsglm <msglm@techchud.xyz>2023-12-17 23:46:53 -0600
commit85b52a21affa45989ba1f9f42cbc42f07c2e9a28 (patch)
treef4fd82978f66059fde28dd81b45491259e9ff39f
parent43b1f6e4fc169bad344b50a33c38e15fcc55d167 (diff)
downloadguix-msglm-85b52a21affa45989ba1f9f42cbc42f07c2e9a28.tar.gz
guix-msglm-85b52a21affa45989ba1f9f42cbc42f07c2e9a28.tar.bz2
guix-msglm-85b52a21affa45989ba1f9f42cbc42f07c2e9a28.zip
add vesktop (vencord)
-rw-r--r--vesktop.scm96
1 files changed, 96 insertions, 0 deletions
diff --git a/vesktop.scm b/vesktop.scm
new file mode 100644
index 0000000..c627980
--- /dev/null
+++ b/vesktop.scm
@@ -0,0 +1,96 @@
+(define-module (vesktop)
+ #: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 video)
+ #: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 vesktop
+ (package
+ (name "vesktop")
+ (version "0.4.4")
+ (source
+ (origin
+ (method url-fetch)
+ (uri
+ (string-append
+ "https://github.com/Vencord/Vesktop/releases/download/v" version "/VencordDesktop_" version "_amd64.deb"))
+ (sha256
+ (base32 "1anc7bm1w7a01lkd9fpm3i53ckjr6h00zqdc05ry4clxw6g7d3xh"))))
+ (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/Vesktop/vencorddesktop"
+ )
+ #:phases
+ #~(modify-phases %standard-phases
+ (replace 'unpack
+ (lambda _
+ (invoke "ar" "x" #$source)
+ (invoke "tar" "xvf" "data.tar.xz")
+ ;; Fix the .desktop file binary location.
+ (substitute* '("usr/share/applications/vencorddesktop.desktop")
+ (("/opt/Vesktop/") (string-append #$output "/bin/")))
+ (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")))
+
+ (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/Vesktop/vencorddesktop")
+ (string-append #$output "/bin/discord"))))
+
+ (add-after 'install-wrapper 'wrap-where-patchelf-does-not-work
+ (lambda _
+ (wrap-program (string-append #$output "/lib/Vesktop/vencorddesktop")
+ `("LD_LIBRARY_PATH" ":" prefix
+ (,(string-join
+ (list
+ (string-append #$output "/lib/Vesktop"))
+ ":"))))))
+ )))
+
+ (inputs (list bash-minimal))
+ (native-inputs (list tar ffmpeg))
+ (home-page "https://github.com/Vencord/Vesktop")
+ (synopsis "Discord experience with Vencord pre-installed")
+ (description "Vesktop is a cross platform desktop app aiming to give
+ you a snappier Discord experience with Vencord pre-installed")
+ ;; not working?
+ (properties
+ '((release-monitoring-url . "https://github.com/Vencord/Vesktop/releases")))
+ (license gpl3)))