@@ -1,4 +1,5 @@
1−{ lib, stdenv
1+{ lib
2+, stdenv
23, fetchurl
34, meson
45, ninja
@@ -10,7 +11,7 @@
1011, gobject-introspection
1112, enableZbar ? false
1213, faacSupport ? false
13−, faac ? null
14+, faac
1415, faad2
1516, libass
1617, libkate
@@ -34,7 +35,6 @@
3435, bluez
3536, chromaprint
3637, curl
37−, darwin
3838, directfb
3939, fdk_aac
4040, flite
@@ -80,20 +80,23 @@
8080, libxml2
8181, srt
8282, vo-aacenc
83+, VideoToolbox
84+, AudioToolbox
85+, AVFoundation
86+, CoreMedia
87+, CoreVideo
88+, Foundation
89+, MediaToolbox
8390}:
8491
85−assert faacSupport -> faac != null;
86−
87−let
88− inherit (lib) optional optionals;
89−in stdenv.mkDerivation rec {
92+stdenv.mkDerivation rec {
9093 pname = "gst-plugins-bad";
9194 version = "1.18.2";
9295
9396 outputs = [ "out" "dev" ];
9497
9598 src = fetchurl {
96− url = "${meta.homepage}/src/${pname}/${pname}-${version}.tar.xz";
99+ url = "https://gstreamer.freedesktop.org/src/${pname}/${pname}-${version}.tar.xz";
97100 sha256 = "06ildd4rl6cynirv3p00d2ddf5is9svj4i7mkahldzhq24pq5mca";
98101 };
99102
@@ -110,7 +113,7 @@ in stdenv.mkDerivation rec {
110113 python3
111114 gettext
112115 gobject-introspection
113− ] ++ optionals stdenv.isLinux [
116+ ] ++ lib.optionals stdenv.isLinux [
114117 wayland # for wayland-scanner
115118 ];
116119
@@ -166,16 +169,16 @@ in stdenv.mkDerivation rec {
166169 libintl
167170 srt
168171 vo-aacenc
169− ] ++ optionals enableZbar [
172+ ] ++ lib.optionals enableZbar [
170173 zbar
171− ] ++ optionals faacSupport [
174+ ] ++ lib.optionals faacSupport [
172175 faac
173− ] ++ optionals stdenv.isLinux [
176+ ] ++ lib.optionals stdenv.isLinux [
174177 bluez
175178 libva # vaapi requires libva -> libdrm -> libpciaccess, which is Linux-only in nixpkgs
176179 wayland
177180 wayland-protocols
178− ] ++ optionals (!stdenv.isDarwin) [
181+ ] ++ lib.optionals (!stdenv.isDarwin) [
179182 # wildmidi requires apple's OpenAL
180183 # TODO: package apple's OpenAL, fix wildmidi, include on Darwin
181184 wildmidi
@@ -202,7 +205,7 @@ in stdenv.mkDerivation rec {
202205 serd
203206 sord
204207 sratom
205− ] ++ optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
208+ ] ++ lib.optionals stdenv.isDarwin [
206209 # For unknown reasons the order is important, e.g. if
207210 # VideoToolbox is last, we get:
208211 # fatal error: 'VideoToolbox/VideoToolbox.h' file not found
@@ -213,7 +216,7 @@ in stdenv.mkDerivation rec {
213216 CoreVideo
214217 Foundation
215218 MediaToolbox
216− ]);
219+ ];
217220
218221 mesonFlags = [
219222 "-Dexamples=disabled" # requires many dependencies and probably not useful for our users
@@ -251,10 +254,10 @@ in stdenv.mkDerivation rec {
251254 "-Dwpe=disabled" # required `wpe-webkit` library not packaged in nixpkgs as of writing
252255 "-Dzxing=disabled" # required `zxing-cpp` library not packaged in nixpkgs as of writing
253256 ]
254− ++ optionals (!stdenv.isLinux) [
257+ ++ lib.optionals (!stdenv.isLinux) [
255258 "-Dva=disabled" # see comment on `libva` in `buildInputs`
256259 ]
257− ++ optionals stdenv.isDarwin [
260+ ++ lib.optionals stdenv.isDarwin [
258261 "-Dbluez=disabled"
259262 "-Dchromaprint=disabled"
260263 "-Ddirectfb=disabled"
@@ -271,11 +274,11 @@ in stdenv.mkDerivation rec {
271274 "-Dladspa=disabled" # requires lrdf
272275 "-Dwebrtc=disabled" # requires libnice, which as of writing doesn't work on Darwin in nixpkgs
273276 "-Dwildmidi=disabled" # see dependencies above
274− ] ++ optionals (!gst-plugins-base.glEnabled) [
275− "-Dgl=disabled"]
276− ++ optionals (!gst-plugins-base.waylandEnabled) [
277+ ] ++ lib.optionals (!gst-plugins-base.glEnabled) [
278+ "-Dgl=disabled"
279+ ] ++ lib.optionals (!gst-plugins-base.waylandEnabled) [
277280 "-Dwayland=disabled"
278− ] ++ optionals (!gst-plugins-base.glEnabled) [
281+ ] ++ lib.optionals (!gst-plugins-base.glEnabled) [
279282 # `applemedia/videotexturecache.h` requires `gst/gl/gl.h`,
280283 # but its meson build system does not declare the dependency.
281284 "-Dapplemedia=disabled"