From 445953f80deb2dabdf4ead1299111ef29e40de37 Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Thu, 29 Aug 2024 21:50:47 -0400 Subject: [PATCH] libcaca: fix build on Darwin libcaca tries to access a private API that is no longer available. It worked before the SDK changes because no Darwin frameworks were available in the build environment, but there is now always an SDK available, causing it to try to build Cocoa code that no longer works. --- pkgs/by-name/li/libcaca/package.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/by-name/li/libcaca/package.nix b/pkgs/by-name/li/libcaca/package.nix index bb0d57168766..78b81bf49169 100644 --- a/pkgs/by-name/li/libcaca/package.nix +++ b/pkgs/by-name/li/libcaca/package.nix @@ -39,6 +39,10 @@ stdenv.mkDerivation rec { configureFlags = [ (if x11Support then "--enable-x11" else "--disable-x11") + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ + # Suppresses a build failure building Cocoa support due to accessing private ivar `_running`, + # which no longer available. + (lib.enableFeature false "cocoa") ]; env.NIX_CFLAGS_COMPILE = lib.optionalString (!x11Support) "-DX_DISPLAY_MISSING";