8 , gobject-introspection
20 , tremor # provides 'virbisidec'
22 , enableX11 ? stdenv.isLinux
25 , enableWayland ? stdenv.isLinux
28 , enableAlsa ? stdenv.isLinux
30 # Enabling Cocoa seems to currently not work, giving compile
31 # errors. Suspected is that a newer version than clang
32 # is needed than 5.0 but it is not clear.
36 , enableGl ? (enableX11 || enableWayland || enableCocoa)
37 , enableCdparanoia ? (!stdenv.isDarwin)
42 stdenv.mkDerivation rec {
43 pname = "gst-plugins-base";
46 outputs = [ "out" "dev" ];
49 url = "https://gstreamer.freedesktop.org/src/${pname}/${pname}-${version}.tar.xz";
50 sha256 = "1b05kg46azrxxvq42c71071lfsnc34pw4vynnkczdqi6g0gzn16x";
54 ./fix_pkgconfig_includedir.patch
68 # TODO add hotdoc here
69 ] ++ lib.optional enableWayland wayland;
81 ] ++ lib.optional (!stdenv.isDarwin) [
83 ] ++ lib.optionals stdenv.isDarwin [
86 ] ++ lib.optionals enableAlsa [
88 ] ++ lib.optionals enableX11 [
92 ] ++ lib.optionals enableWayland [
95 ] ++ lib.optional enableCocoa Cocoa
96 ++ lib.optional enableCdparanoia cdparanoia;
98 propagatedBuildInputs = [
103 "-Dexamples=disabled" # requires many dependencies and probably not useful for our users
104 "-Ddoc=disabled" # `hotdoc` not packaged in nixpkgs as of writing
105 "-Dgl-graphene=disabled" # not packaged in nixpkgs as of writing
106 # See https://github.com/GStreamer/gst-plugins-base/blob/d64a4b7a69c3462851ff4dcfa97cc6f94cd64aef/meson_options.txt#L15 for a list of choices
107 "-Dgl_winsys=${lib.concatStringsSep "," (lib.optional enableX11 "x11" ++ lib.optional enableWayland "wayland" ++ lib.optional enableCocoa "cocoa")}"
109 ++ lib.optional (!enableX11) "-Dx11=disabled"
110 # TODO How to disable Wayland?
111 ++ lib.optional (!enableGl) "-Dgl=disabled"
112 ++ lib.optional (!enableAlsa) "-Dalsa=disabled"
113 ++ lib.optional (!enableCdparanoia) "-Dcdparanoia=disabled"
114 ++ lib.optionals stdenv.isDarwin [
115 "-Dlibvisual=disabled"
120 common/scangobj-merge.py \
121 scripts/extract-release-date-from-doap-file.py
124 # This package has some `_("string literal")` string formats
125 # that trip up clang with format security enabled.
126 hardeningDisable = [ "format" ];
128 doCheck = false; # fails, wants DRI access for OpenGL
131 # Downstream `gst-*` packages depending on `gst-plugins-base`
132 # have meson build options like 'gl' etc. that depend
133 # on these features being built in `-base`.
134 # If they are not built here, then the downstream builds
135 # will fail, as they, too, use `-Dauto_features=enabled`
136 # which would enable these options unconditionally.
137 # That means we must communicate to these downstream packages
138 # if the `-base` enabled these options or not, so that
139 # the can enable/disable those features accordingly.
140 # The naming `*Enabled` vs `enable*` is intentional to
141 # distinguish inputs from outputs (what is to be built
142 # vs what was built) and to make them easier to search for.
143 glEnabled = enableGl;
144 waylandEnabled = enableWayland;
148 description = "Base GStreamer plug-ins and helper libraries";
149 homepage = "https://gstreamer.freedesktop.org";
150 license = licenses.lgpl2Plus;
151 platforms = platforms.unix;
152 maintainers = with maintainers; [ matthewbauer ];