From 3a1877ce56cf620303db1d219ba37b4c7ea2d343 Mon Sep 17 00:00:00 2001 From: Axel Karjalainen Date: Mon, 22 Jul 2024 13:50:17 +0300 Subject: [PATCH 1/2] maintainers: add axka --- maintainers/maintainer-list.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 9a4e26d944d6..9fd21fcb655c 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"; From 9bdb97c052d5d51a05b05081e9eb249131fab809 Mon Sep 17 00:00:00 2001 From: Axel Karjalainen Date: Mon, 22 Jul 2024 13:51:44 +0300 Subject: [PATCH 2/2] otadump: init at 0.1.2 --- pkgs/by-name/ot/otadump/no-static.patch | 13 ++++++++ pkgs/by-name/ot/otadump/package.nix | 41 +++++++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 pkgs/by-name/ot/otadump/no-static.patch create mode 100644 pkgs/by-name/ot/otadump/package.nix 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"; + }; +}