git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #131691 from musfay/android-tools

android-tools: use system fmt

commitbdcf4caa1bcd9e5d27b43abb06c44dd0e1453234 authorMichael Weiss <dev.primeos@gmail.com> dateWed 28 Jul 2021, 11:57 (5 years ago) parenta66d9f96120ab4
1 file changed+14−3
pkgs/tools/misc/android-tools/default.nix+14−3
pkgs/tools/misc/android-tools/default.nix+14−3
@@ -1,6 +1,6 @@
1−{ lib, stdenv, fetchurl
1+{ lib, stdenv, fetchurl, fetchpatch
22, cmake, perl, go
3−, protobuf, zlib, gtest, brotli, lz4, zstd, libusb1, pcre2
3+, protobuf, zlib, gtest, brotli, lz4, zstd, libusb1, pcre2, fmt_7
44}:
55
66stdenv.mkDerivation rec {
@@ -12,8 +12,19 @@ stdenv.mkDerivation rec {
1212 sha256 = "sha256-YbO/bCQMsLTQzP72lsVZhuBmV4Q2J9+VD9z2iBrw+NQ=";
1313 };
1414
15+ patches = [
16+ # fmt 8 breaks the build but we can use fmt 7 from Nixpkgs:
17+ (fetchpatch {
18+ # Vendor google's version of fmtlib
19+ url = "https://github.com/nmeum/android-tools/commit/21061c1dfb006c22304053c1f6f9e48ae4cbe25a.patch";
20+ sha256 = "17mcsgfc3i8xq4hck0ppnzafh15aljxy7j2q4djcmwnvrkv9kx3s";
21+ revert = true;
22+ excludes = [ "vendor/fmtlib" ];
23+ })
24+ ];
25+
1526 nativeBuildInputs = [ cmake perl go ];
16− buildInputs = [ protobuf zlib gtest brotli lz4 zstd libusb1 pcre2 ];
27+ buildInputs = [ protobuf zlib gtest brotli lz4 zstd libusb1 pcre2 fmt_7 ];
1728
1829 # Don't try to fetch any Go modules via the network:
1930 GOFLAGS = [ "-mod=vendor" ];