Merge pull request #131691 from musfay/android-tools

android-tools: use system fmt
This commit is contained in:
Michael Weiss 2021-07-28 11:57:25 +02:00 committed by GitHub
commit bdcf4caa1b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,6 +1,6 @@
{ lib, stdenv, fetchurl
{ lib, stdenv, fetchurl, fetchpatch
, cmake, perl, go
, protobuf, zlib, gtest, brotli, lz4, zstd, libusb1, pcre2
, protobuf, zlib, gtest, brotli, lz4, zstd, libusb1, pcre2, fmt_7
}:
stdenv.mkDerivation rec {
@ -12,8 +12,19 @@ stdenv.mkDerivation rec {
sha256 = "sha256-YbO/bCQMsLTQzP72lsVZhuBmV4Q2J9+VD9z2iBrw+NQ=";
};
patches = [
# fmt 8 breaks the build but we can use fmt 7 from Nixpkgs:
(fetchpatch {
# Vendor google's version of fmtlib
url = "https://github.com/nmeum/android-tools/commit/21061c1dfb006c22304053c1f6f9e48ae4cbe25a.patch";
sha256 = "17mcsgfc3i8xq4hck0ppnzafh15aljxy7j2q4djcmwnvrkv9kx3s";
revert = true;
excludes = [ "vendor/fmtlib" ];
})
];
nativeBuildInputs = [ cmake perl go ];
buildInputs = [ protobuf zlib gtest brotli lz4 zstd libusb1 pcre2 ];
buildInputs = [ protobuf zlib gtest brotli lz4 zstd libusb1 pcre2 fmt_7 ];
# Don't try to fetch any Go modules via the network:
GOFLAGS = [ "-mod=vendor" ];