summary refs log tree commit diff
path: root/pkgs/development/libraries/gstreamer/base/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/libraries/gstreamer/base/default.nix')
-rw-r--r--pkgs/development/libraries/gstreamer/base/default.nix71
1 files changed, 46 insertions, 25 deletions
diff --git a/pkgs/development/libraries/gstreamer/base/default.nix b/pkgs/development/libraries/gstreamer/base/default.nix
index 2cd0c14c1f3..dfd3383cdba 100644
--- a/pkgs/development/libraries/gstreamer/base/default.nix
+++ b/pkgs/development/libraries/gstreamer/base/default.nix
@@ -1,46 +1,67 @@
-{ stdenv, fetchurl, pkgconfig, python, gstreamer, gobjectIntrospection
-, orc, alsaLib, libXv, pango, libtheora
-, cdparanoia, libvisual, libintlOrEmpty
-}:
+{ stdenv, fetchurl, fetchpatch, lib
+, pkgconfig, meson, ninja, gettext, gobjectIntrospection
+, python, gstreamer, orc, pango, libtheora, libvisual
+, libintl, libopus
+, enableX11 ? stdenv.isLinux, libXv
+, enableWayland ? stdenv.isLinux, wayland
+, enableAlsa ? stdenv.isLinux, alsaLib
+, enableCocoa ? false, darwin
+, enableCdparanoia ? (!stdenv.isDarwin), cdparanoia }:
 
 stdenv.mkDerivation rec {
-  name = "gst-plugins-base-1.12.3";
+  name = "gst-plugins-base-1.14.0";
 
-  meta = {
+  meta = with lib; {
     description = "Base plugins and helper libraries";
     homepage = https://gstreamer.freedesktop.org;
-    license = stdenv.lib.licenses.lgpl2Plus;
-    platforms = stdenv.lib.platforms.unix;
+    license = licenses.lgpl2Plus;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ matthewbauer ];
   };
 
   src = fetchurl {
     url = "${meta.homepage}/src/gst-plugins-base/${name}.tar.xz";
-    sha256 = "19ffwdch7m777ragmwpy6prqmfb742ym1n3ki40s0zyki627plyk";
+    sha256 = "0h39bcp7fcd9kgb189lxr8l0hm0almvzpzgpdh1jpq2nzxh4d43y";
   };
 
   outputs = [ "out" "dev" ];
 
-  nativeBuildInputs = [
-    pkgconfig python gobjectIntrospection
-  ];
+  nativeBuildInputs = [ pkgconfig python gettext gobjectIntrospection ]
+
+  # Broken meson with Darwin. Should hopefully be fixed soon. Tracking
+  # in https://bugzilla.gnome.org/show_bug.cgi?id=781148.
+  ++ lib.optionals (!stdenv.isDarwin) [ meson ninja ];
 
-  buildInputs = [
-    orc libXv pango libtheora cdparanoia
+  # TODO How to pass these to Meson?
+  configureFlags = [
+    "--enable-x11=${if enableX11 then "yes" else "no"}"
+    "--enable-wayland=${if enableWayland then "yes" else "no"}"
+    "--enable-cocoa=${if enableCocoa then "yes" else "no"}"
   ]
-  ++ libintlOrEmpty
-  ++ stdenv.lib.optional stdenv.isLinux alsaLib
-  ++ stdenv.lib.optional (!stdenv.isDarwin) libvisual;
 
-  propagatedBuildInputs = [ gstreamer ];
+  # Introspection fails on my MacBook currently
+  ++ lib.optional stdenv.isDarwin "--disable-introspection";
 
-  configureFlags = if stdenv.isDarwin then [
-    # Does not currently build on Darwin
-    "--disable-libvisual"
-    # Undefined symbols _cdda_identify and _cdda_identify_scsi in cdparanoia
-    "--disable-cdparanoia"
-  ] else null;
+  buildInputs = [ orc libtheora libintl libopus ]
+    ++ lib.optional enableAlsa alsaLib
+    ++ lib.optionals enableX11 [ libXv pango ]
+    ++ lib.optional enableWayland wayland
+    ++ lib.optional enableCocoa darwin.apple_sdk.frameworks.Cocoa
+    ++ lib.optional enableCdparanoia cdparanoia;
 
-  NIX_LDFLAGS = if stdenv.isDarwin then "-lintl" else null;
+  propagatedBuildInputs = [ gstreamer ];
+
+  postPatch = ''
+    patchShebangs .
+  '';
 
   enableParallelBuilding = true;
+
+  patches = [
+    (fetchpatch {
+        url = "https://bug794856.bugzilla-attachments.gnome.org/attachment.cgi?id=370414";
+        sha256 = "07x43xis0sr0hfchf36ap0cibx0lkfpqyszb3r3w9dzz301fk04z";
+    })
+    ./fix_pkgconfig_includedir.patch
+  ];
 }