mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 15:36:20 -05:00
gnu: Mesa: Install scripts to a separate output.
* gnu/packages/gl.scm (mesa)[outputs]: New field. [arguments]: Add phase 'split-outputs'.
This commit is contained in:
parent
18ac48364c
commit
0df5bdf81c
1 changed files with 21 additions and 0 deletions
|
@ -289,6 +289,7 @@ (define-public mesa
|
|||
("python" ,python-wrapper)
|
||||
("python-mako" ,python-mako)
|
||||
("which" ,(@ (gnu packages base) which))))
|
||||
(outputs '("out" "bin"))
|
||||
(arguments
|
||||
`(#:configure-flags
|
||||
'(,@(match (%current-system)
|
||||
|
@ -382,6 +383,26 @@ (define-public mesa
|
|||
(("\"gbm_dri\\.so")
|
||||
(string-append "\"" out "/lib/dri/gbm_dri.so")))
|
||||
#t)))
|
||||
(add-after 'install 'split-outputs
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(let ((out (assoc-ref outputs "out"))
|
||||
(bin (assoc-ref outputs "bin")))
|
||||
,@(match (%current-system)
|
||||
((or "i686-linux" "x86_64-linux")
|
||||
;; Install the Vulkan overlay control script to a separate
|
||||
;; output to prevent a reference on Python, saving ~70 MiB
|
||||
;; on the closure size.
|
||||
'((copy-recursively (string-append out "/bin")
|
||||
(string-append bin "/bin"))
|
||||
(delete-file-recursively (string-append out "/bin"))))
|
||||
(_
|
||||
;; XXX: On architectures without the Vulkan overlay layer
|
||||
;; just create an empty file because outputs can not be
|
||||
;; added conditionally.
|
||||
'((mkdir-p (string-append bin "/bin"))
|
||||
(call-with-output-file (string-append bin "/bin/.empty")
|
||||
(const #t)))))
|
||||
#t)))
|
||||
(add-after 'install 'symlinks-instead-of-hard-links
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
;; All the drivers and gallium targets create hard links upon
|
||||
|
|
Loading…
Reference in a new issue