about summary refs log tree commit diff
path: root/pkgs/development/libraries/gstreamer/bad/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/libraries/gstreamer/bad/default.nix')
-rw-r--r--pkgs/development/libraries/gstreamer/bad/default.nix47
1 files changed, 25 insertions, 22 deletions
diff --git a/pkgs/development/libraries/gstreamer/bad/default.nix b/pkgs/development/libraries/gstreamer/bad/default.nix
index 89011b9230f1d..40b10d0983ad2 100644
--- a/pkgs/development/libraries/gstreamer/bad/default.nix
+++ b/pkgs/development/libraries/gstreamer/bad/default.nix
@@ -1,4 +1,5 @@
-{ lib, stdenv
+{ lib
+, stdenv
 , fetchurl
 , meson
 , ninja
@@ -10,7 +11,7 @@
 , gobject-introspection
 , enableZbar ? false
 , faacSupport ? false
-, faac ? null
+, faac
 , faad2
 , libass
 , libkate
@@ -34,7 +35,6 @@
 , bluez
 , chromaprint
 , curl
-, darwin
 , directfb
 , fdk_aac
 , flite
@@ -80,20 +80,23 @@
 , libxml2
 , srt
 , vo-aacenc
+, VideoToolbox
+, AudioToolbox
+, AVFoundation
+, CoreMedia
+, CoreVideo
+, Foundation
+, MediaToolbox
 }:
 
-assert faacSupport -> faac != null;
-
-let
-  inherit (lib) optional optionals;
-in stdenv.mkDerivation rec {
+stdenv.mkDerivation rec {
   pname = "gst-plugins-bad";
   version = "1.18.2";
 
   outputs = [ "out" "dev" ];
 
   src = fetchurl {
-    url = "${meta.homepage}/src/${pname}/${pname}-${version}.tar.xz";
+    url = "https://gstreamer.freedesktop.org/src/${pname}/${pname}-${version}.tar.xz";
     sha256 = "06ildd4rl6cynirv3p00d2ddf5is9svj4i7mkahldzhq24pq5mca";
   };
 
@@ -110,7 +113,7 @@ in stdenv.mkDerivation rec {
     python3
     gettext
     gobject-introspection
-  ] ++ optionals stdenv.isLinux [
+  ] ++ lib.optionals stdenv.isLinux [
     wayland # for wayland-scanner
   ];
 
@@ -166,16 +169,16 @@ in stdenv.mkDerivation rec {
     libintl
     srt
     vo-aacenc
-  ] ++ optionals enableZbar [
+  ] ++ lib.optionals enableZbar [
     zbar
-  ] ++ optionals faacSupport [
+  ] ++ lib.optionals faacSupport [
     faac
-  ] ++ optionals stdenv.isLinux [
+  ] ++ lib.optionals stdenv.isLinux [
     bluez
     libva # vaapi requires libva -> libdrm -> libpciaccess, which is Linux-only in nixpkgs
     wayland
     wayland-protocols
-  ] ++ optionals (!stdenv.isDarwin) [
+  ] ++ lib.optionals (!stdenv.isDarwin) [
     # wildmidi requires apple's OpenAL
     # TODO: package apple's OpenAL, fix wildmidi, include on Darwin
     wildmidi
@@ -202,7 +205,7 @@ in stdenv.mkDerivation rec {
     serd
     sord
     sratom
-  ] ++ optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
+  ] ++ lib.optionals stdenv.isDarwin [
     # For unknown reasons the order is important, e.g. if
     # VideoToolbox is last, we get:
     #     fatal error: 'VideoToolbox/VideoToolbox.h' file not found
@@ -213,7 +216,7 @@ in stdenv.mkDerivation rec {
     CoreVideo
     Foundation
     MediaToolbox
-  ]);
+  ];
 
   mesonFlags = [
     "-Dexamples=disabled" # requires many dependencies and probably not useful for our users
@@ -251,10 +254,10 @@ in stdenv.mkDerivation rec {
     "-Dwpe=disabled" # required `wpe-webkit` library not packaged in nixpkgs as of writing
     "-Dzxing=disabled" # required `zxing-cpp` library not packaged in nixpkgs as of writing
   ]
-  ++ optionals (!stdenv.isLinux) [
+  ++ lib.optionals (!stdenv.isLinux) [
     "-Dva=disabled" # see comment on `libva` in `buildInputs`
   ]
-  ++ optionals stdenv.isDarwin [
+  ++ lib.optionals stdenv.isDarwin [
     "-Dbluez=disabled"
     "-Dchromaprint=disabled"
     "-Ddirectfb=disabled"
@@ -271,11 +274,11 @@ in stdenv.mkDerivation rec {
     "-Dladspa=disabled" # requires lrdf
     "-Dwebrtc=disabled" # requires libnice, which as of writing doesn't work on Darwin in nixpkgs
     "-Dwildmidi=disabled" # see dependencies above
-  ] ++ optionals (!gst-plugins-base.glEnabled) [
-    "-Dgl=disabled"]
-  ++ optionals (!gst-plugins-base.waylandEnabled) [
+  ] ++ lib.optionals (!gst-plugins-base.glEnabled) [
+    "-Dgl=disabled"
+  ] ++ lib.optionals (!gst-plugins-base.waylandEnabled) [
     "-Dwayland=disabled"
-  ] ++ optionals (!gst-plugins-base.glEnabled) [
+  ] ++ lib.optionals (!gst-plugins-base.glEnabled) [
     # `applemedia/videotexturecache.h` requires `gst/gl/gl.h`,
     # but its meson build system does not declare the dependency.
     "-Dapplemedia=disabled"