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.nix52
1 files changed, 22 insertions, 30 deletions
diff --git a/pkgs/development/libraries/gstreamer/bad/default.nix b/pkgs/development/libraries/gstreamer/bad/default.nix
index d4cc2f43aaa6..de1a3700cc2b 100644
--- a/pkgs/development/libraries/gstreamer/bad/default.nix
+++ b/pkgs/development/libraries/gstreamer/bad/default.nix
@@ -1,29 +1,22 @@
-{ stdenv, fetchurl, pkgconfig, python, gst-plugins-base, orc
+{ stdenv, fetchurl, fetchpatch, meson, ninja, gettext
+, pkgconfig, python, gst-plugins-base, orc
 , faacSupport ? false, faac ? null
-, gtkSupport ? false, gtk3 ? null
 , faad2, libass, libkate, libmms
-, libmodplug, mpeg2dec, mpg123
+, libmodplug, mpeg2dec
 , openjpeg, libopus, librsvg
 , wildmidi, fluidsynth, libvdpau, wayland
 , libwebp, xvidcore, gnutls, mjpegtools
-, libGLU_combined, libintlOrEmpty, libgme
+, libGLU_combined, libintl, libgme
 , openssl, x265, libxml2
 }:
 
 assert faacSupport -> faac != null;
-assert gtkSupport -> gtk3 != null;
 
 let
-  inherit (stdenv.lib) optional optionalString;
-
-  # OpenJPEG version is hardcoded in package source
-  openJpegVersion = with stdenv;
-    lib.concatStringsSep "." (lib.lists.take 2
-      (lib.splitString "." (lib.getVersion openjpeg)));
-
+  inherit (stdenv.lib) optional;
 in
 stdenv.mkDerivation rec {
-  name = "gst-plugins-bad-1.12.3";
+  name = "gst-plugins-bad-1.14.0";
 
   meta = with stdenv.lib; {
     description = "Gstreamer Bad Plugins";
@@ -36,46 +29,45 @@ stdenv.mkDerivation rec {
     '';
     license     = licenses.lgpl2Plus;
     platforms   = platforms.linux ++ platforms.darwin;
+    maintainers = with maintainers; [ matthewbauer ];
   };
 
-  # TODO: Fix Cocoa build. The problem was ARC, which might be related to too
-  #       old version of Apple SDK's.
-  configureFlags = optional stdenv.isDarwin "--disable-cocoa";
-
-  patchPhase = ''
-    sed -i 's/openjpeg-2.2/openjpeg-${openJpegVersion}/' ext/openjpeg/*
+  preConfigure = ''
+    patchShebangs .
   '';
 
+  patches = [
+    (fetchpatch {
+        url = "https://bug794856.bugzilla-attachments.gnome.org/attachment.cgi?id=370409";
+        sha256 = "0hy0rcn35alq65yqwri4fqjz2hf3nyyg5c7rnndk51msmqjxpprk";
+    })
+    ./fix_pkgconfig_includedir.patch
+  ];
+
   src = fetchurl {
     url = "${meta.homepage}/src/gst-plugins-bad/${name}.tar.xz";
-    sha256 = "1v5z3i5ha20gmbb3r9dwsaaspv5fm1jfzlzwlzqx1gjj31v5kl1n";
+    sha256 = "17sgzgx1c54k5rzz7ljyz3is0n7yj56k74vv05h8z1gjnsnjnppd";
   };
 
   outputs = [ "out" "dev" ];
 
-  nativeBuildInputs = [ pkgconfig python ];
+  nativeBuildInputs = [ meson ninja pkgconfig python gettext ];
 
   buildInputs = [
     gst-plugins-base orc
-    faad2 gtk3 libass libkate libmms
-    libmodplug mpeg2dec mpg123
+    faad2 libass libkate libmms
+    libmodplug mpeg2dec
     openjpeg libopus librsvg
     fluidsynth libvdpau
     libwebp xvidcore gnutls libGLU_combined
     libgme openssl x265 libxml2
+    libintl
   ]
-    ++ libintlOrEmpty
     ++ optional faacSupport faac
-    # for gtksink
-    ++ optional gtkSupport gtk3
     ++ optional stdenv.isLinux wayland
     # wildmidi requires apple's OpenAL
     # TODO: package apple's OpenAL, fix wildmidi, include on Darwin
     ++ optional (!stdenv.isDarwin) wildmidi
     # TODO: mjpegtools uint64_t is not compatible with guint64 on Darwin
     ++ optional (!stdenv.isDarwin) mjpegtools;
-
-  LDFLAGS = optionalString stdenv.isDarwin "-lintl";
-
-  enableParallelBuilding = true;
 }