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