Merge pull request #136174 from musfay/android-tools-avb

android-tools: install missing tools

authored by Michael Weiss and committed by GitHub dc47a7be 912565a7

+16 -1
+16 -1
pkgs/tools/misc/android-tools/default.nix
··· 1 1 { lib, stdenv, fetchurl, fetchpatch 2 - , cmake, perl, go 2 + , cmake, perl, go, python3 3 3 , protobuf, zlib, gtest, brotli, lz4, zstd, libusb1, pcre2, fmt_7 4 4 }: 5 + 6 + let 7 + pythonEnv = python3.withPackages(ps: [ ps.protobuf ]); 8 + in 5 9 6 10 stdenv.mkDerivation rec { 7 11 pname = "android-tools"; ··· 23 27 }) 24 28 ]; 25 29 30 + postPatch = '' 31 + sed -i -E "0,/import api_pb2/ s//from google.protobuf import api_pb2/" vendor/avb/aftltool.py 32 + ''; 33 + 26 34 nativeBuildInputs = [ cmake perl go ]; 27 35 buildInputs = [ protobuf zlib gtest brotli lz4 zstd libusb1 pcre2 fmt_7 ]; 36 + propagatedBuildInputs = [ pythonEnv ]; 28 37 29 38 # Don't try to fetch any Go modules via the network: 30 39 GOFLAGS = [ "-mod=vendor" ]; 31 40 32 41 preConfigure = '' 33 42 export GOCACHE=$TMPDIR/go-cache 43 + ''; 44 + 45 + postInstall = '' 46 + install -Dm755 ../vendor/avb/aftltool.py -t $out/bin 47 + install -Dm755 ../vendor/avb/avbtool.py -t $out/bin 48 + install -Dm755 ../vendor/mkbootimg/mkbootimg.py $out/bin/mkbootimg 34 49 ''; 35 50 36 51 meta = with lib; {