mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-05-09 02:35:54 +02:00
gnu: alacritty: Speedup patching library references phase.
* gnu/packages/terminals.scm (alacritty)[arguments]: Rewrite the 'add-absolute-library-references phase to run faster. Change-Id: I6eb41a1739b0199dc883a5ce0f6772ee0691f9a6
This commit is contained in:
+15
-15
@@ -1520,22 +1520,22 @@ basic input/output.")
|
||||
;; inputs to this package, because of the way Guix's Rust build
|
||||
;; system currently works. <http://issues.guix.gnu.org/46399>
|
||||
;; might fix this and allow patching them directly.
|
||||
(define shared-library-regex
|
||||
;; Using regex decreases the time it takes to run the
|
||||
;; substitution over 12000 files by about 40%.
|
||||
(string-join
|
||||
(list "libEGL\\.so" ; rust-glutin
|
||||
"libGL\\.so" ; rust-x11-dl, rust-glutin
|
||||
"libX[[:alpha:]]*\\.so" ; rust-x11-dl
|
||||
; rust-wayland-sys, rust-wayland-backend
|
||||
"libwayland-[[:alpha:]]*\\.so"
|
||||
;; rust-xkbcommon-dl
|
||||
"libxkbcommon\\.so"
|
||||
"libxkbcommon-x11\\.so")
|
||||
"|"))
|
||||
(substitute* (find-files vendor-dir "\\.rs$")
|
||||
(("libEGL\\.so")
|
||||
(search-input-file inputs "lib/libEGL.so"))
|
||||
(("libGL\\.so")
|
||||
(search-input-file inputs "lib/libGL.so"))
|
||||
;; Lots of libraries from rust-x11-dl and others.
|
||||
(("libX[[:alpha:]]*\\.so" all)
|
||||
(search-input-file inputs (string-append "lib/" all)))
|
||||
|
||||
;; There are several libwayland libraries.
|
||||
(("libwayland-[[:alpha:]]*\\.so" all)
|
||||
(search-input-file inputs (string-append "lib/" all)))
|
||||
(("libxkbcommon-x11\\.so")
|
||||
(search-input-file inputs "lib/libxkbcommon-x11.so"))
|
||||
(("libxkbcommon\\.so")
|
||||
(search-input-file inputs "lib/libxkbcommon.so")))))
|
||||
((shared-library-regex all)
|
||||
(search-input-file inputs (string-append "lib/" all))))))
|
||||
(add-after 'install 'install-more
|
||||
(lambda* (#:key native-inputs inputs #:allow-other-keys
|
||||
#:rest args)
|
||||
|
||||
Reference in New Issue
Block a user