From a2be9025372e05229d32e1a4cb9d050c5ca86a22 Mon Sep 17 00:00:00 2001 From: Emily Date: Mon, 23 Sep 2024 17:05:19 +0100 Subject: [PATCH] libaom: skip `_POSIX_C_SOURCE` patch on Darwin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This should possibly be a conditional in the patch itself, but I don’t know what the appropriate CMake conditional would be. --- pkgs/development/libraries/libaom/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/libaom/default.nix b/pkgs/development/libraries/libaom/default.nix index 3845f1bc7ddb..c533c9859f6f 100644 --- a/pkgs/development/libraries/libaom/default.nix +++ b/pkgs/development/libraries/libaom/default.nix @@ -23,7 +23,9 @@ stdenv.mkDerivation rec { patches = [ ./outputs.patch - + ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ + # This patch defines `_POSIX_C_SOURCE`, which breaks system headers + # on Darwin. (fetchurl { name = "musl.patch"; url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/media-libs/libaom/files/libaom-3.4.0-posix-c-source-ftello.patch?id=50c7c4021e347ee549164595280cf8a23c960959";