summary refs log tree commit diff
path: root/gnu/packages/gstreamer.scm
diff options
context:
space:
mode:
authorLeo Prikler <leo.prikler@student.tugraz.at>2020-11-22 18:54:14 +0100
committerLeo Prikler <leo.prikler@student.tugraz.at>2020-12-29 20:24:10 +0100
commit4f196b0a9e74d6f02a08fd6fda08279034ae1629 (patch)
tree6685edf80a00445fb374ba9c166da804bf4eb2ab /gnu/packages/gstreamer.scm
parent251e86823fc517d011144204119256632a5e32ab (diff)
downloadguix-4f196b0a9e74d6f02a08fd6fda08279034ae1629.tar.gz
gnu: Add gst-plugins/selection.
* gnu/packages/gstreamer.scm (gst-plugins/selection): New variable.
Diffstat (limited to 'gnu/packages/gstreamer.scm')
-rw-r--r--gnu/packages/gstreamer.scm22
1 files changed, 22 insertions, 0 deletions
diff --git a/gnu/packages/gstreamer.scm b/gnu/packages/gstreamer.scm
index f8c5159a3b..3b572b9f07 100644
--- a/gnu/packages/gstreamer.scm
+++ b/gnu/packages/gstreamer.scm
@@ -912,6 +912,28 @@ decoders, muxers, and demuxers provided by FFmpeg.")
 non-linear editors.")
     (license license:gpl2+)))
 
+(define-public gst-plugins/selection
+  (lambda* (pkg #:key plugins configure-flags)
+    "Build PKG with only PLUGINS enabled.  Optionally, if CONFIGURE-FLAGS are
+given, also pass them to the build system instead of the ones used by PKG."
+    (package/inherit pkg
+      (arguments
+       (substitute-keyword-arguments (package-arguments pkg)
+         ((#:configure-flags flags `(,@(or configure-flags '())))
+          `(append
+            (list
+             ,@(map (lambda (plugin)
+                      (string-append "-D" plugin "=enabled"))
+                    plugins))
+            (list ,@(or configure-flags flags))))
+          ((#:phases phases)
+           `(modify-phases ,phases
+              (add-after 'unpack 'disable-auto-plugins
+                (lambda _
+                  (substitute* "meson_options.txt"
+                    (("'auto'") "'disabled'"))
+                  #t)))))))))
+
 (define-public python-gst
   (package
     (name "python-gst")