Subject: [PATCH 1/8] gnu: Add v4l-utils-minimal.

From: Nicolas Graves <[email-masked]>
Date: Sun, 24 Nov 2024 23:29:08 +0100

* gnu/packages/video.scm (v4l-utils-minimal): New variable.
---
 gnu/packages/video.scm | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 2da458ed01..4cc6735dca 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -4035,6 +4035,30 @@ (define-public v4l-utils
     ;; libv4l2 is LGPL2.1+, while utilities are GPL2 only.
     (license (list license:lgpl2.1+ license:gpl2))))
 
+(define-public v4l-utils-minimal
+  (package
+    (inherit v4l-utils)
+    (source #f)
+    (name "v4l-utils-minimal")
+    (build-system trivial-build-system)
+    (arguments
+     (list
+      #:builder
+      (with-imported-modules '((guix build utils))
+        #~(begin
+            (use-modules (guix build utils))
+            (copy-recursively #$(this-package-native-input "v4l-utils")
+                              #$output)
+            (substitute* (find-files (string-append #$output "/lib/pkgconfig")
+                                     "\\.pc$")
+              (("^prefix=.*")
+               (string-append "prefix=" #$output "\n")))))))
+    (outputs '("out"))
+    (native-inputs (modify-inputs (package-native-inputs v4l-utils)
+                     (prepend v4l-utils)))
+    (inputs (modify-inputs (package-inputs v4l-utils)
+              (delete "qtbase")))))
+
 (define-public obs
   (package
     (name "obs")
-- 
2.46.0