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.
This commit is contained in:
Jan Tojnar 2019-12-05 14:18:57 +01:00
parent 77b605546c
commit 5a139f0e7d
No known key found for this signature in database
GPG key ID: 7FAB2A15F7A607A4

View file

@ -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