[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
50/63: gnu: Mesa: Install scripts to a separate output.
From: |
guix-commits |
Subject: |
50/63: gnu: Mesa: Install scripts to a separate output. |
Date: |
Tue, 26 May 2020 17:18:13 -0400 (EDT) |
mbakke pushed a commit to branch staging2
in repository guix.
commit 0df5bdf81cb3b3b8aa0694ca0a20fedd65ee4723
Author: Marius Bakke <address@hidden>
AuthorDate: Fri May 22 18:53:14 2020 +0200
gnu: Mesa: Install scripts to a separate output.
* gnu/packages/gl.scm (mesa)[outputs]: New field.
[arguments]: Add phase 'split-outputs'.
---
gnu/packages/gl.scm | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index 3d94ddb..3d8d268 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -289,6 +289,7 @@ also known as DXTn or DXTC) for 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 @@ also known as DXTn or DXTC) for 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
- 40/63: gnu: spirv-tools: Update to 2020.2., (continued)
- 40/63: gnu: spirv-tools: Update to 2020.2., guix-commits, 2020/05/26
- 34/63: gnu: Mesa: Fix ineffective substitution on i686-linux., guix-commits, 2020/05/26
- 42/63: gnu: glslang: Update to 8.13.3743., guix-commits, 2020/05/26
- 44/63: gnu: vulkan-headers: Update to 1.2.141., guix-commits, 2020/05/26
- 48/63: gnu: shaderc: Update to 2020.0., guix-commits, 2020/05/26
- 53/63: gnu: Mesa: Fix substitutions for absolute library references., guix-commits, 2020/05/26
- 55/63: gnu: vkd3d: Fix build with newer Vulkan headers., guix-commits, 2020/05/26
- 58/63: gnu: mtxclient: Update to 0.3.0., guix-commits, 2020/05/26
- 46/63: gnu: vulkan-loader: Enable tests., guix-commits, 2020/05/26
- 45/63: gnu: vulkan-loader: Update to 1.2.140., guix-commits, 2020/05/26
- 50/63: gnu: Mesa: Install scripts to a separate output.,
guix-commits <=
- 57/63: gnu: qtdeclarative: Fix reference on qmlcachegen., guix-commits, 2020/05/26
- 61/63: gnu: mesa-headers: Do not inherit outputs from Mesa., guix-commits, 2020/05/26
- 63/63: Merge branch 'master' into staging, guix-commits, 2020/05/26