[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
06/15: gnu: v4l-utils: Move graphical tools to a separate output
From: |
guix-commits |
Subject: |
06/15: gnu: v4l-utils: Move graphical tools to a separate output |
Date: |
Tue, 10 Nov 2020 16:34:17 -0500 (EST) |
mbakke pushed a commit to branch master
in repository guix.
commit a172a646d8727bde2a568d5a721a9f5789973442
Author: Ivan Kozlov <kanichos@yandex.ru>
AuthorDate: Sun Nov 1 15:27:37 2020 +0300
gnu: v4l-utils: Move graphical tools to a separate output
v4l-utils is a common dependency. Separate graphical tools to avoid pulling
in
qtbase unless they are referenced.
* gnu/packages/video.scm (v4l-utils)[outputs]: New 'gui' output.
[arguments]: Add 'split' phase.
Signed-off-by: Marius Bakke <marius@gnu.org>
---
gnu/packages/video.scm | 31 ++++++++++++++++++++++++++++++-
1 file changed, 30 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index b3926af..0188d15 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -45,6 +45,7 @@
;;; Copyright © 2020 Vinicius Monego <monego@posteo.net>
;;; Copyright © 2020 Brett Gilio <brettg@gnu.org>
;;; Copyright © 2020 Alexandru-Sergiu Marton <brown121407@posteo.ro>
+;;; Copyright © 2020 Ivan Kozlov <kanichos@yandex.ru>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -2987,11 +2988,39 @@ tools, XML authoring components, and an extensible
plug-in based API.")
(base32
"1bkqlrizx0j2rd6ybam2x17bjrpwzl4v4szmnzm3cmixis3w3npr"))))
(build-system gnu-build-system)
+ ;; Separate graphical tools in order to save almost 1 GiB on the closure
+ ;; for the common case.
+ (outputs '("out" "gui"))
(arguments
'(#:configure-flags
(list (string-append "--with-udevdir="
(assoc-ref %outputs "out")
- "/lib/udev"))))
+ "/lib/udev"))
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'install 'split
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out"))
+ (gui (assoc-ref outputs "gui")))
+ (mkdir-p (string-append gui "/bin"))
+ (mkdir-p (string-append gui "/share/man/man1"))
+ (mkdir-p (string-append gui "/share/applications"))
+ (for-each
+ (lambda (prog)
+ (for-each
+ (lambda (file)
+ (rename-file (string-append out file)
+ (string-append gui file)))
+ (list
+ (string-append "/bin/" prog)
+ (string-append "/share/man/man1/" prog ".1")
+ (string-append "/share/applications/" prog ".desktop"))))
+ '("qv4l2" "qvidcap"))
+ (copy-recursively (string-append out "/share/icons")
+ (string-append gui "/share/icons"))
+ (delete-file-recursively (string-append out "/share/icons"))
+ (rmdir (string-append out "/share/applications"))
+ #t))))))
(native-inputs
`(("perl" ,perl)
("pkg-config" ,pkg-config)))
- branch master updated (28e2f27 -> 569cd53), guix-commits, 2020/11/10
- 04/15: gnu: pre-commit: Update to 2.8.1., guix-commits, 2020/11/10
- 06/15: gnu: v4l-utils: Move graphical tools to a separate output,
guix-commits <=
- 07/15: gnu: v4l-utils: Do not build static libraries., guix-commits, 2020/11/10
- 08/15: gnu: sdcc: Remove non-free code., guix-commits, 2020/11/10
- 01/15: gnu: ungoogled-chromium: Update to 86.0.4240.193-0.b68e17f., guix-commits, 2020/11/10
- 02/15: gnu: cl-slime-swank: Update to 2.26., guix-commits, 2020/11/10
- 03/15: gnu: Add python-re-assert., guix-commits, 2020/11/10
- 05/15: gnu: python-canonicaljson: Update to 1.4.0., guix-commits, 2020/11/10
- 11/15: gnu: gnucash: Enable python bindings., guix-commits, 2020/11/10
- 15/15: gnu: nomad: Update to 0.2.0-alpha-199-g3e7a475., guix-commits, 2020/11/10
- 14/15: gnu: g-golf: Update to ef830107b9765bd6a2da848d0cbe45e11374c0b5., guix-commits, 2020/11/10
- 10/15: gnu: Add setzer., guix-commits, 2020/11/10