biome: 1.9.2 -> 1.9.3
[NixPkgs.git] / pkgs / tools / archivers / payload_dumper / default.nix
blobebb717a9e4ceb8685c5df861582606e9eff2f8de
1 { lib
2 , stdenv
3 , makeWrapper
4 , python3
5 , fetchFromGitHub
6 }:
8 stdenv.mkDerivation (finalAttrs: {
9   pname = "payload_dumper";
10   version = "unstable-2022-04-11";
12   src = fetchFromGitHub {
13     owner = "vm03";
14     repo = "payload_dumper";
15     rev = "c1eb5dbbc7bd88ac94635ae90ec22ccf92f89881";
16     sha256 = "1j1hbh5vqq33wq2b9gqvm1qs9nl0bmqklbnyyyhwkcha7zxn0aki";
17   };
19   nativeBuildInputs = [ makeWrapper ];
21   buildInputs = with python3.pkgs; [ bsdiff4 protobuf ];
23   installPhase = ''
24     runHook preInstall
26     sitePackages=$out/${python3.sitePackages}/${finalAttrs.pname}
28     install -D ./payload_dumper.py $out/bin/payload_dumper
29     install -D ./update_metadata_pb2.py $sitePackages/update_metadata_pb2.py
31     wrapProgram $out/bin/payload_dumper \
32         --set PYTHONPATH "$sitePackages:$PYTHONPATH"
34     runHook postInstall
35   '';
37   meta = with lib; {
38     homepage = finalAttrs.src.meta.homepage;
39     description = "Android OTA payload dumper";
40     license = licenses.gpl3;
41     maintainers = with maintainers; [ DamienCassou ];
42     mainProgram = "payload_dumper";
43   };