libresprite: fix darwin by removing homebrew interference (#498574)

This commit is contained in:
Francesco Gazzetta
2026-03-18 16:57:32 +00:00
committed by GitHub
2 changed files with 22 additions and 2 deletions
+19
View File
@@ -0,0 +1,19 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1234567..abcdefg 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -151,14 +151,4 @@ include_directories(${ZLIB_INCLUDE_DIRS})
# libArchive
-if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
- # Homebrew ships libarchive keg only, include dirs have to be set manually
- execute_process(
- COMMAND brew --prefix libarchive
- OUTPUT_VARIABLE LIBARCHIVE_PREFIX
- OUTPUT_STRIP_TRAILING_WHITESPACE
- COMMAND_ERROR_IS_FATAL ANY
- )
- set(LibArchive_INCLUDE_DIR "${LIBARCHIVE_PREFIX}/include")
-endif()
find_package(LibArchive REQUIRED)
include_directories(${LibArchive_INCLUDE_DIR})
+3 -2
View File
@@ -40,6 +40,9 @@ stdenv.mkDerivation (finalAttrs: {
patches = [
# From https://github.com/LibreSprite/LibreSprite/pull/565
./cmake4.diff
# Remove Homebrew-specific brew invocation for libarchive on Darwin;
# Nix provides libarchive directly via buildInputs.
./no-brew.patch
];
nativeBuildInputs = [
cmake
@@ -110,7 +113,5 @@ stdenv.mkDerivation (finalAttrs: {
'';
maintainers = with lib.maintainers; [ fgaz ];
platforms = lib.platforms.all;
# https://github.com/LibreSprite/LibreSprite/issues/308
broken = stdenv.hostPlatform.isDarwin;
};
})