Skip to content

Commit

Permalink
otadump: init at 0.1.2 (NixOS#329129)
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleksanaa authored Dec 11, 2024
2 parents e866043 + 9bdb97c commit 9f41b06
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 0 deletions.
6 changes: 6 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2304,6 +2304,12 @@
githubId = 99703210;
name = "Katherine Jamison";
};
axka = {
name = "Axel Karjalainen";
email = "[email protected]";
github = "axelkar";
githubId = 120189068;
};
ayazhafiz = {
email = "[email protected]";
github = "hafiz";
Expand Down
13 changes: 13 additions & 0 deletions pkgs/by-name/ot/otadump/no-static.patch
Original file line number Diff line number Diff line change
@@ -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"
41 changes: 41 additions & 0 deletions pkgs/by-name/ot/otadump/package.nix
Original file line number Diff line number Diff line change
@@ -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";
};
}

0 comments on commit 9f41b06

Please sign in to comment.