[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
12/21: gnu: Mesa: Install scripts to a separate output.
From: |
guix-commits |
Subject: |
12/21: gnu: Mesa: Install scripts to a separate output. |
Date: |
Fri, 22 May 2020 18:10:19 -0400 (EDT) |
mbakke pushed a commit to branch staging
in repository guix.
commit 43a8d83c08d736b613a385ff0d06941bd373b642
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
- 01/21: gnu: spirv-headers: Update to 1.5.3., (continued)
- 01/21: gnu: spirv-headers: Update to 1.5.3., guix-commits, 2020/05/22
- 05/21: gnu: glslang: Build shared libraries., guix-commits, 2020/05/22
- 02/21: gnu: spirv-tools: Update to 2020.2., guix-commits, 2020/05/22
- 03/21: gnu: spirv-tools: Do not build static libraries., guix-commits, 2020/05/22
- 04/21: gnu: glslang: Update to 8.13.3743., guix-commits, 2020/05/22
- 06/21: gnu: vulkan-headers: Update to 1.2.141., guix-commits, 2020/05/22
- 07/21: gnu: vulkan-loader: Update to 1.2.140., guix-commits, 2020/05/22
- 09/21: gnu: vulkan-tools: Update to 1.2.140., guix-commits, 2020/05/22
- 11/21: gnu: shaderc: Enable (some) tests., guix-commits, 2020/05/22
- 10/21: gnu: shaderc: Update to 2020.0., guix-commits, 2020/05/22
- 12/21: gnu: Mesa: Install scripts to a separate output.,
guix-commits <=
- 17/21: gnu: vkd3d: Fix build with newer Vulkan headers., guix-commits, 2020/05/22
- 18/21: gnu: libdrm: Update to 2.4.101., guix-commits, 2020/05/22
- 13/21: gnu: Mesa: Remove unused input., guix-commits, 2020/05/22
- 14/21: gnu: Mesa: Remove obsolete phase., guix-commits, 2020/05/22
- 15/21: gnu: Mesa: Fix substitutions for absolute library references., guix-commits, 2020/05/22
- 16/21: gnu: vkquake: Fix build with newer Vulkan headers., guix-commits, 2020/05/22
- 20/21: gnu: mtxclient: Update to 0.3.0., guix-commits, 2020/05/22
- 08/21: gnu: vulkan-loader: Enable tests., guix-commits, 2020/05/22
- 19/21: gnu: qtdeclarative: Fix reference on qmlcachegen., guix-commits, 2020/05/22
- 21/21: gnu: nheko: Update to 0.7.1., guix-commits, 2020/05/22