Commit 270a8431 authored by Luke Granger-Brown's avatar Luke Granger-Brown
Browse files

gst_all_1.gst-plugins-bad: fix aja support

The dependency on libajantv2 was already there, but it didn't do
anything, because the actual plugin is disabled.
parent 5f1d2105
Loading
Loading
Loading
Loading
+11 −2
Original line number Diff line number Diff line
{ lib
, stdenv
, fetchurl
, fetchpatch
, substituteAll
, meson
, ninja
@@ -46,6 +47,7 @@
, flite
, gsm
, json-glib
, ajaSupport ? lib.meta.availableOn stdenv.hostPlatform libajantv2
, libajantv2
, libaom
, libdc1394
@@ -129,6 +131,12 @@ stdenv.mkDerivation rec {
      src = ./fix-paths.patch;
      inherit (addDriverRunpath) driverLink;
    })
    # Add support for newer AJA SDK from next GStreamer release
    (fetchpatch {
      url = "https://github.com/GStreamer/gstreamer/commit/d68ac0db571f44cae42b57c876436b3b09df616b.patch";
      hash = "sha256-ZXwlHzuPT8kUKt5+HkqFH5tzL9l5NusDXImabj4fBbI=";
      relative = "subprojects/${pname}";
    })
  ];

  nativeBuildInputs = [
@@ -214,6 +222,8 @@ stdenv.mkDerivation rec {
    libmicrodns
  ] ++ lib.optionals openh264Support [
    openh264
  ] ++ lib.optionals ajaSupport [
    libajantv2
  ] ++ lib.optionals (gst-plugins-base.waylandEnabled && stdenv.hostPlatform.isLinux) [
    libva # vaapi requires libva -> libdrm -> libpciaccess, which is Linux-only in nixpkgs
    wayland
@@ -224,7 +234,6 @@ stdenv.mkDerivation rec {

    chromaprint
    flite
    libajantv2
    libdrm
    libgudev
    sbc
@@ -300,7 +309,7 @@ stdenv.mkDerivation rec {
    "-Donnx=disabled" # depends on `libonnxruntime` not packaged in nixpkgs as of writing
    "-Dopenaptx=enabled" # since gstreamer-1.20.1 `libfreeaptx` is supported for circumventing the dubious license conflict with `libopenaptx`
    "-Dopencv=${if opencvSupport then "enabled" else "disabled"}" # Reduces rebuild size when `config.cudaSupport = true`
    "-Daja=disabled" # should pass libajantv2 via aja-sdk-dir instead
    "-Daja=${if ajaSupport then "enabled" else "disabled"}"
    "-Dmicrodns=${if microdnsSupport then "enabled" else "disabled"}"
    "-Dbluez=${if bluezSupport then "enabled" else "disabled"}"
    (lib.mesonEnable "openh264" openh264Support)