From 48ed94664e9f8307e569a44ab3bd8e569b493bd6 Mon Sep 17 00:00:00 2001 From: Samuel Tardieu Date: Tue, 19 Sep 2023 12:44:58 +0200 Subject: [PATCH] android-tools: 34.0.1 -> 34.0.4 The patch for linking with private `abseil-cpp` has been removed because it is present in the upstream version already. `ninja` has been added to the dependencies as building with `cmake`+`ninja` is faster than with `cmake`+`make`. The `-mod=vendor` go flag has been removed as the vendored version of `boringssl` cannot be built as-is: ``` go: inconsistent vendoring in /build/android-tools-34.0.4/vendor/boringssl: golang.org/x/crypto@v0.6.0: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt golang.org/x/net@v0.7.0: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt golang.org/x/sys@v0.5.0: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt golang.org/x/term@v0.5.0: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt ``` --- pkgs/tools/misc/android-tools/default.nix | 24 ++++------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/pkgs/tools/misc/android-tools/default.nix b/pkgs/tools/misc/android-tools/default.nix index 6276d50c73d4..891bea3fe474 100644 --- a/pkgs/tools/misc/android-tools/default.nix +++ b/pkgs/tools/misc/android-tools/default.nix @@ -1,5 +1,5 @@ { lib, stdenv, fetchurl -, cmake, pkg-config, perl, go, python3 +, cmake, ninja, pkg-config, perl, go, python3 , protobuf, zlib, gtest, brotli, lz4, zstd, libusb1, pcre2 }: @@ -9,33 +9,17 @@ in stdenv.mkDerivation rec { pname = "android-tools"; - version = "34.0.1"; + version = "34.0.4"; src = fetchurl { url = "https://github.com/nmeum/android-tools/releases/download/${version}/android-tools-${version}.tar.xz"; - hash = "sha256-YCNOy8oZoXp+L0akWBlg1kW3xVuHDZJKIUlMdqb1SOw="; + hash = "sha256-eiL/nOqB/0849WBoeFjo+PtzNiRBJZfjzBqwJi+No6E="; }; - 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 ]; + nativeBuildInputs = [ cmake ninja pkg-config perl go ]; buildInputs = [ protobuf zlib gtest brotli lz4 zstd libusb1 pcre2 ]; propagatedBuildInputs = [ pythonEnv ]; - # Don't try to fetch any Go modules via the network: - GOFLAGS = [ "-mod=vendor" ]; - preConfigure = '' export GOCACHE=$TMPDIR/go-cache '';