From c05d8ea394a97a61bb57ea7c4f6382b0d1aecd5e Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Tue, 27 Apr 2021 21:26:52 +0200 Subject: [PATCH] gst_all_1.gst-plugins-bad: fix build on Darwin --- pkgs/development/libraries/gstreamer/bad/default.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/development/libraries/gstreamer/bad/default.nix b/pkgs/development/libraries/gstreamer/bad/default.nix index 40b10d0983ad..faf38a1a05fb 100644 --- a/pkgs/development/libraries/gstreamer/bad/default.nix +++ b/pkgs/development/libraries/gstreamer/bad/default.nix @@ -1,6 +1,7 @@ { lib , stdenv , fetchurl +, fetchpatch , meson , ninja , gettext @@ -103,6 +104,15 @@ stdenv.mkDerivation rec { patches = [ # Use pkgconfig to inject the includedirs ./fix_pkgconfig_includedir.patch + ] ++ lib.optionals stdenv.isDarwin [ + # Fix “error: cannot initialize a parameter of type 'unsigned long *' with an rvalue of type 'typename std::remove_reference::type *' (aka 'volatile unsigned long *')” on Darwin. + (fetchpatch { + url = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/commit/640a65bf966df065d41a511e2d76d1f26a2e770c.patch"; + sha256 = "E5pig+qEfR58Jticr6ydFxZOhM3ZJ8zgrf5K4BdiB/Y="; + includes = [ + "ext/opencv/gstcvdilateerode.cpp" + ]; + }) ]; nativeBuildInputs = [