1{ stdenv, fetchzip, bzip2, openssl, zlib }:
2
3stdenv.mkDerivation rec {
4 name = "imgpatchtools-${version}";
5 version = "0.3";
6
7 src = fetchzip {
8 url = "https://github.com/erfanoabdi/imgpatchtools/archive/${version}.tar.gz";
9 sha256 = "1cwp1hfhip252dz0mbkhrsrkws6m15k359n4amw2vfnglnls8czd";
10 };
11
12 buildInputs = [ bzip2 openssl zlib ];
13
14 installPhase = "install -Dt $out/bin bin/*";
15
16 meta = with stdenv.lib; {
17 description = "Tools to manipulate Android OTA archives";
18 longDescription = ''
19 This package is useful for Android development. In particular, it can be
20 used to extract ext4 /system image from Android distribution ZIP archives
21 such as those distributed by LineageOS and Replicant, via BlockImageUpdate
22 utility. It also includes other, related, but arguably more advanced tools
23 for OTA manipulation.
24 '';
25 homepage = https://github.com/erfanoabdi/imgpatchtools;
26 license = licenses.gpl3;
27 maintainers = with maintainers; [ yegortimoshenko ];
28 platforms = platforms.linux;
29 };
30}