From 8c066391412e93b6290823fd8c4b1b613166d673 Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Mon, 6 May 2019 23:08:13 +0200 Subject: [PATCH] gstreamer: add patches to fix cross --- .../gstreamer/legacy/gstreamer/default.nix | 31 ++++++++++++++++--- pkgs/top-level/all-packages.nix | 4 +-- 2 files changed, 27 insertions(+), 8 deletions(-) diff --git a/pkgs/development/libraries/gstreamer/legacy/gstreamer/default.nix b/pkgs/development/libraries/gstreamer/legacy/gstreamer/default.nix index 96c9d8e0c8e..d03151e4344 100644 --- a/pkgs/development/libraries/gstreamer/legacy/gstreamer/default.nix +++ b/pkgs/development/libraries/gstreamer/legacy/gstreamer/default.nix @@ -1,4 +1,6 @@ -{ fetchurl, stdenv, perl, bison, flex, pkgconfig, glib, libxml2, libintl }: +{ fetchurl, fetchpatch, stdenv, autoreconfHook +, perl, bison2, flex, pkgconfig, glib, libxml2, libintl +}: stdenv.mkDerivation rec { name = "gstreamer-0.10.36"; @@ -13,12 +15,31 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" ]; - nativeBuildInputs = [ pkgconfig libintl ]; - buildInputs = [ perl bison flex ]; + nativeBuildInputs = [ autoreconfHook flex perl pkgconfig libintl bison2 glib ]; propagatedBuildInputs = [ glib libxml2 ]; - # See https://trac.macports.org/ticket/40783 for explanation of patch - patches = stdenv.lib.optional stdenv.isDarwin ./darwin.patch; + patches = [ + (fetchpatch { + url = "https://github.com/GStreamer/common/commit/03a0e5736761a72d4ed880e8c485bbf9e4a8ea47.patch"; + sha256 = "0rin3x01yy78ky3smmhbwlph18hhym18q4x9w6ddiqajg5lk4xhm"; + extraPrefix = "common/"; + stripLen = 1; + }) + (fetchpatch { + url = "https://github.com/GStreamer/common/commit/8aadeaaa8a948d7ce62008789ab03e9aa514c2b9.patch"; + sha256 = "0n2mqvq2al7jr2hflhz4l781i3jya5a9i725jvy508ambpgycz3x"; + extraPrefix = "common/"; + stripLen = 1; + }) + (fetchpatch { + url = "https://github.com/GStreamer/common/commit/7bb2bcecda471a0d514a964365a78150f3ee5747.patch"; + sha256 = "0famdj70m7wjvr1dpy7iywhrkqxmrshxz0rizz1bixgp42dvkhbq"; + extraPrefix = "common/"; + stripLen = 1; + }) + ] ++ + # See https://trac.macports.org/ticket/40783 for explanation of patch + stdenv.lib.optional stdenv.isDarwin ./darwin.patch; postPatch = '' sed -i -e 's/^ /\t/' docs/gst/Makefile.in docs/libs/Makefile.in docs/plugins/Makefile.in diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 75c43dad75b..aefee3d9f0e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10478,9 +10478,7 @@ in callPackage = newScope { libav = pkgs.ffmpeg; }; }); - gstreamer = callPackage ../development/libraries/gstreamer/legacy/gstreamer { - bison = bison2; - }; + gstreamer = callPackage ../development/libraries/gstreamer/legacy/gstreamer { }; gst-plugins-base = callPackage ../development/libraries/gstreamer/legacy/gst-plugins-base { inherit (darwin.apple_sdk.frameworks) ApplicationServices;