* [bug#44369] [PATCH] gnu: v4l-utils: Move graphical tools to a separate output
@ 2020-11-01 12:27 Ivan Kozlov
2020-11-10 20:57 ` bug#44369: " Marius Bakke
0 siblings, 1 reply; 2+ messages in thread
From: Ivan Kozlov @ 2020-11-01 12:27 UTC (permalink / raw)
To: 44369
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.
---
gnu/packages/video.scm | 28 +++++++++++++++++++++++++++-
1 file changed, 27 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 34b0fbe294..9ff7d0a45a 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -2987,11 +2987,37 @@ tools, XML authoring components, and an extensible plug-in based API.")
(base32
"1bkqlrizx0j2rd6ybam2x17bjrpwzl4v4szmnzm3cmixis3w3npr"))))
(build-system gnu-build-system)
+ (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)))
--
2.28.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* bug#44369: [PATCH] gnu: v4l-utils: Move graphical tools to a separate output
2020-11-01 12:27 [bug#44369] [PATCH] gnu: v4l-utils: Move graphical tools to a separate output Ivan Kozlov
@ 2020-11-10 20:57 ` Marius Bakke
0 siblings, 0 replies; 2+ messages in thread
From: Marius Bakke @ 2020-11-10 20:57 UTC (permalink / raw)
To: Ivan Kozlov, 44369-done
[-- Attachment #1: Type: text/plain, Size: 454 bytes --]
Ivan Kozlov <kanichos@yandex.ru> writes:
> v4l-utils is a common dependency. Separate graphical tools to avoid pulling in qtbase unless they are referenced.
Thanks a lot for this. I added a comment in the package definition
about it and committed. It brings the closure size down from 1090.4 MiB
to a mere 104.8 MiB!
I also added a commit that removes the static libraries, further
reducing the size a tiny bit (and ensures that it can be grafted).
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 507 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-11-10 20:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-01 12:27 [bug#44369] [PATCH] gnu: v4l-utils: Move graphical tools to a separate output Ivan Kozlov
2020-11-10 20:57 ` bug#44369: " Marius Bakke
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).