diff mbox series

[bug#44806,staging,3/6] gnu: Add gst-plugins/selection.

Message ID 20201122203625.1347-3-leo.prikler@student.tugraz.at
State Accepted
Headers show
Series Add Pitivi | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Leo Prikler Nov. 22, 2020, 8:36 p.m. UTC
* gnu/packages/gstreamer.scm (gst-plugins/selection): New variable.
---
 gnu/packages/gstreamer.scm | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

Comments

Leo Famulari Dec. 15, 2020, 7:19 a.m. UTC | #1
On Sun, Nov 22, 2020 at 09:36:22PM +0100, Leo Prikler wrote:
> * gnu/packages/gstreamer.scm (gst-plugins/selection): New variable.

With the patch series applied on the current staging branch
(56e2da5ae851c), compilation of Guix fails like this:

------
$ guix environment --pure guix -- make -j4
[...]
gnu/packages/gstreamer.scm:907:0: error: (define-public gst-plugins/selection (lambda* (pkg #:key plugins configure-flags)) "Build PKG with only PLUGINS enabled.  Optionally, if CONFIGURE-FLAGS are\ngiven, 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 (quasiquote (list (unquote-splicing (or configure-flags (quote ()))))) (quasiquote (append (list (unquote-splicing (map (lambda (plugin) (string-append "-D" plugin "=enabled")) plugins))) (unquote (or configure-flags flags))))) ((#:phases phases) (quasiquote (modify-phases (unquote phases) (add-after (quote unpack) (quote disable-auto-plugins) (lambda _ (substitute* "meson_options.txt" (("'auto'") "'disabled'")) #t)))))))))): source expression failed to match any pattern
make[2]: *** [Makefile:6247: make-go] Error 1
------

Can you reproduce it?
diff mbox series

Patch

diff --git a/gnu/packages/gstreamer.scm b/gnu/packages/gstreamer.scm
index d0bc422a98..4756508f2e 100644
--- a/gnu/packages/gstreamer.scm
+++ b/gnu/packages/gstreamer.scm
@@ -903,6 +903,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 `(list ,@(or configure-flags '()))
+          `(append
+            (list
+             ,@(map (lambda (plugin)
+                      (string-append "-D" plugin "=enabled"))
+                    plugins))
+            ,(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")