[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: |
Mon, 25 May 2020 15:15:29 -0400 (EDT) |
mbakke pushed a commit to branch staging2
in repository guix.
commit 350aca3904a0547cbfa24c62f14d68a118ade5f5
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
- 45/63: gnu: vulkan-loader: Update to 1.2.140., (continued)
- 45/63: gnu: vulkan-loader: Update to 1.2.140., guix-commits, 2020/05/25
- 48/63: gnu: shaderc: Update to 2020.0., guix-commits, 2020/05/25
- 52/63: gnu: Mesa: Remove obsolete phase., guix-commits, 2020/05/25
- 23/63: gnu: python-requests: Update to 2.23.0., guix-commits, 2020/05/25
- 34/63: gnu: Mesa: Fix ineffective substitution on i686-linux., guix-commits, 2020/05/25
- 36/63: Merge branch 'master' into staging, guix-commits, 2020/05/25
- 39/63: gnu: spirv-headers: Update to 1.5.3., guix-commits, 2020/05/25
- 44/63: gnu: vulkan-headers: Update to 1.2.141., guix-commits, 2020/05/25
- 51/63: gnu: Mesa: Remove unused input., guix-commits, 2020/05/25
- 49/63: gnu: shaderc: Enable (some) tests., guix-commits, 2020/05/25
- 50/63: gnu: Mesa: Install scripts to a separate output.,
guix-commits <=
- 29/63: gnu: pcre2: Update to 10.35., guix-commits, 2020/05/25
- 53/63: gnu: Mesa: Fix substitutions for absolute library references., guix-commits, 2020/05/25
- 61/63: gnu: mesa-headers: Do not inherit outputs from Mesa., guix-commits, 2020/05/25
- 54/63: gnu: vkquake: Fix build with newer Vulkan headers., guix-commits, 2020/05/25
- 56/63: gnu: libdrm: Update to 2.4.101., guix-commits, 2020/05/25
- 62/63: gnu: qtwebengine: Fix build failure., guix-commits, 2020/05/25
- 43/63: gnu: glslang: Build shared libraries., guix-commits, 2020/05/25
- 47/63: gnu: vulkan-tools: Update to 1.2.140., guix-commits, 2020/05/25
- 55/63: gnu: vkd3d: Fix build with newer Vulkan headers., guix-commits, 2020/05/25