diff options
-rw-r--r-- | vesktop.scm | 109 |
1 files changed, 64 insertions, 45 deletions
diff --git a/vesktop.scm b/vesktop.scm index 82e8ef1..040192a 100644 --- a/vesktop.scm +++ b/vesktop.scm @@ -15,13 +15,15 @@ #:use-module (gnu packages pulseaudio) #:use-module (gnu packages video) #:use-module (gnu packages xdisorg) + #:use-module (gnu packages commencement) #: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 (guix packages) + #:use-module (guix transformations) #:use-module (nonguix build-system binary) #:use-module (nonguix build-system chromium-binary) #:use-module (nonguix licenses) @@ -29,6 +31,10 @@ ) +(define use-more-recent-toolchain + (options->transformation + '((with-version . "gcc-toolchain-11=gcc-toolchain-13")))) + (define-public vesktop (package (name "vesktop-bin") @@ -42,55 +48,68 @@ (sha256 (base32 "0clrmd7m2izwaq2apvjm5i7dh38aifmaxpsqa59c5gzxar0i8kg6")))) (supported-systems '("x86_64-linux")) - (build-system chromium-binary-build-system) + (build-system (use-more-recent-toolchain chromium-binary-build-system)) (arguments - (list #:validate-runpath? #f ; TODO: fails on wrapped binary and included other files + (list + #:validate-runpath? #f ; TODO: fails on wrapped binary and included other files #:wrapper-plan #~'( "lib/Vesktop/vesktop" ) - #: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/vesktop.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"))) + #: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/vesktop.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/vesktop") - (string-append #$output "/bin/discord")))) + (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/vesktop") + (string-append #$output "/bin/discord")) + (symlink (string-append #$output "/lib/Vesktop/vesktop") + (string-append #$output "/bin/vencord")) + )) - (add-after 'install-wrapper 'wrap-where-patchelf-does-not-work - (lambda _ - (wrap-program (string-append #$output "/lib/Vesktop/vesktop") - `("LD_LIBRARY_PATH" ":" prefix - (,(string-join - (list - (string-append #$output "/lib/Vesktop")) - ":")))))) - ))) + (add-after 'install 'wrap-where-patchelf-does-not-work + (lambda _ + (wrap-program (string-append #$output "/lib/Vesktop/vesktop") + `("LD_LIBRARY_PATH" ":" prefix + (,(string-join + (list + ;(string-append #$(this-package-input "nss") "/lib/nss") + ;(string-append #$(this-package-input "eudev") "/lib") + ;(string-append #$(this-package-input "libnotify") "/lib") + ;(string-append #$(this-package-input "libxkbfile") "/lib") + (string-append #$(this-package-input "pipewire") "/lib") + ;(string-append #$(this-package-input "sqlcipher") "/lib") + ;(string-append #$(this-package-input "zlib") "/lib") + (string-append #$output "/lib/Vesktop") + (string-append #$(this-package-input "gcc-toolchain") "/lib") + ) + ":")))))) + ))) - (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))) +(inputs (list pipewire gcc-toolchain-13)) +(native-inputs (list tar gcc)) +(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))) |