about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJan Tojnar <jtojnar@gmail.com>2019-12-05 14:18:57 +0100
committerJan Tojnar <jtojnar@gmail.com>2019-12-05 15:14:29 +0100
commit5a139f0e7d2507cbcaeb6a4b2beddcdb68f5da85 (patch)
tree4a27bd9b1478635cb1ed92050e1a9163dcd3801d
parent77b605546c37ab09b519aac52deed42fb2909bf1 (diff)
downloadnixlib-5a139f0e7d2507cbcaeb6a4b2beddcdb68f5da85.tar
nixlib-5a139f0e7d2507cbcaeb6a4b2beddcdb68f5da85.tar.gz
nixlib-5a139f0e7d2507cbcaeb6a4b2beddcdb68f5da85.tar.bz2
nixlib-5a139f0e7d2507cbcaeb6a4b2beddcdb68f5da85.tar.lz
nixlib-5a139f0e7d2507cbcaeb6a4b2beddcdb68f5da85.tar.xz
nixlib-5a139f0e7d2507cbcaeb6a4b2beddcdb68f5da85.tar.zst
nixlib-5a139f0e7d2507cbcaeb6a4b2beddcdb68f5da85.zip
gst_all_1.gst-plugins-base: Fix building Wayland support
Apparently, generic builder sets `nullglob`, disappearing any flags containing square brackets
not resolving to file names (e.g. `mesonFlags = [ "-Dgl_winsys=[x11,wayland]" ];`). This caused
the `gl_winsys` flag default to `auto` and, since we were missing `wayland-protocols`, Wayland
support was not built.

Fortunately, Meson also supports simple array notation without square brackets, so we can use
that. No need to wait for `_structuredAttrs`.

We also no longer set `gl_platform` flag, since passing the default auto value is redundant.
-rw-r--r--pkgs/development/libraries/gstreamer/base/default.nix17
1 files changed, 11 insertions, 6 deletions
diff --git a/pkgs/development/libraries/gstreamer/base/default.nix b/pkgs/development/libraries/gstreamer/base/default.nix
index d38199cf7873..6f21839b64cf 100644
--- a/pkgs/development/libraries/gstreamer/base/default.nix
+++ b/pkgs/development/libraries/gstreamer/base/default.nix
@@ -26,6 +26,7 @@
 , libXv
 , enableWayland ? stdenv.isLinux
 , wayland
+, wayland-protocols
 , enableAlsa ? stdenv.isLinux
 , alsaLib
 # Enabling Cocoa seems to currently not work, giving compile
@@ -82,10 +83,15 @@ stdenv.mkDerivation rec {
   ] ++ lib.optionals stdenv.isDarwin [
     pango
     darwin.apple_sdk.frameworks.OpenGL
-  ] ++ lib.optional enableAlsa alsaLib
-    ++ lib.optionals enableX11 [ libXv pango ]
-    ++ lib.optional enableWayland wayland
-    ++ lib.optional enableCocoa darwin.apple_sdk.frameworks.Cocoa
+  ] ++ lib.optionals enableAlsa [
+    alsaLib
+  ] ++ lib.optionals enableX11 [
+    libXv
+    pango
+  ] ++ lib.optionals enableWayland [
+    wayland
+    wayland-protocols
+  ] ++ lib.optional enableCocoa darwin.apple_sdk.frameworks.Cocoa
     ++ lib.optional enableCdparanoia cdparanoia;
 
   propagatedBuildInputs = [
@@ -95,9 +101,8 @@ stdenv.mkDerivation rec {
   mesonFlags = [
     "-Dexamples=disabled" # requires many dependencies and probably not useful for our users
     "-Dgl-graphene=disabled" # not packaged in nixpkgs as of writing
-    "-Dgl_platform=[${lib.optionalString (enableX11 || enableWayland || enableCocoa) "auto"}]"
     # See https://github.com/GStreamer/gst-plugins-base/blob/d64a4b7a69c3462851ff4dcfa97cc6f94cd64aef/meson_options.txt#L15 for a list of choices
-    "-Dgl_winsys=[${lib.concatStringsSep "," (lib.optional enableX11 "x11" ++ lib.optional enableWayland "wayland" ++ lib.optional enableCocoa "cocoa")}]"
+    "-Dgl_winsys=${lib.concatStringsSep "," (lib.optional enableX11 "x11" ++ lib.optional enableWayland "wayland" ++ lib.optional enableCocoa "cocoa")}"
     # We must currently disable gtk_doc API docs generation,
     # because it is not compatible with some features being disabled.
     # See for example