Merge #249692: android-tools: Fix build with protobuf-3.23

...into staging-next
This commit is contained in:
Vladimír Čunát 2023-08-18 17:10:14 +02:00
commit b0b94e82a3
No known key found for this signature in database
GPG Key ID: E747DF1F9575A3AA

View File

@ -16,6 +16,19 @@ stdenv.mkDerivation rec {
hash = "sha256-YCNOy8oZoXp+L0akWBlg1kW3xVuHDZJKIUlMdqb1SOw=";
};
patches = [
# Fix building with newer protobuf versions.
(fetchurl {
url = "https://gitlab.archlinux.org/archlinux/packaging/packages/android-tools/-/raw/295ad7d5cb1e3b4c75bd40281d827f9168bbaa57/protobuf-23.patch";
hash = "sha256-KznGgZdYT6e5wG3gtfJ6i93bYfp/JFygLW/ZzvXUA0Y=";
})
];
# Fix linking with private abseil-cpp libraries.
postPatch = ''
sed -i '/^find_package(Protobuf REQUIRED)$/i find_package(protobuf CONFIG)' vendor/CMakeLists.txt
'';
nativeBuildInputs = [ cmake pkg-config perl go ];
buildInputs = [ protobuf zlib gtest brotli lz4 zstd libusb1 pcre2 ];
propagatedBuildInputs = [ pythonEnv ];