diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 013cf15b614f..06b5028c6cce 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -2304,6 +2304,12 @@ githubId = 99703210; name = "Katherine Jamison"; }; + axka = { + name = "Axel Karjalainen"; + email = "axel@axka.fi"; + github = "axelkar"; + githubId = 120189068; + }; ayazhafiz = { email = "ayaz.hafiz.1@gmail.com"; github = "hafiz"; diff --git a/pkgs/by-name/ot/otadump/no-static.patch b/pkgs/by-name/ot/otadump/no-static.patch new file mode 100644 index 000000000000..f9ba98be1c33 --- /dev/null +++ b/pkgs/by-name/ot/otadump/no-static.patch @@ -0,0 +1,13 @@ +diff --git a/Cargo.toml b/Cargo.toml +index 65be773..3499dee 100644 +--- a/Cargo.toml ++++ b/Cargo.toml +@@ -30,7 +30,7 @@ nom = "7.1.3" + nom-derive = "0.10.1" + prost = "0.11.8" + rayon = "1.7.0" +-rust-lzma = { version = "0.6.0", features = ["static"] } ++rust-lzma = "0.6.0" + sha2 = "0.10.6" + sync-unsafe-cell = "0.1.0" + tempfile = "3.6.0" diff --git a/pkgs/by-name/ot/otadump/package.nix b/pkgs/by-name/ot/otadump/package.nix new file mode 100644 index 000000000000..2567cf28ee8a --- /dev/null +++ b/pkgs/by-name/ot/otadump/package.nix @@ -0,0 +1,41 @@ +{ + lib, + fetchFromGitHub, + rustPlatform, + pkg-config, + protobuf, + xz, +}: + +rustPlatform.buildRustPackage rec { + pname = "otadump"; + version = "0.1.2"; + + src = fetchFromGitHub { + owner = "crazystylus"; + repo = "otadump"; + rev = version; + hash = "sha256-4zPVcTU+0otV4EPQi80uSRkpRo9XzI0V3Kr17ugXX2U="; + }; + + patches = [ ./no-static.patch ]; + + nativeBuildInputs = [ + pkg-config + protobuf + ]; + + buildInputs = [ xz ]; + + doCheck = false; # There are no tests + + cargoHash = "sha256-lTzEgy9mevkmefvTZT9hEBHN5I+kXVqTev5+sy/JoaE="; + + meta = { + description = "Command-line tool to extract partitions from Android OTA files"; + homepage = "https://github.com/crazystylus/otadump"; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.axka ]; + mainProgram = "otadump"; + }; +}