Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
83 lines
1.9 KiB
Nix
83 lines
1.9 KiB
Nix
{
|
|
lib,
|
|
apksigner,
|
|
bash,
|
|
fetchFromGitHub,
|
|
installShellFiles,
|
|
pandoc,
|
|
python3,
|
|
}:
|
|
|
|
python3.pkgs.buildPythonApplication rec {
|
|
pname = "apksigcopier";
|
|
version = "1.1.1";
|
|
format = "pyproject";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "obfusk";
|
|
repo = "apksigcopier";
|
|
tag = "v${version}";
|
|
sha256 = "sha256-VuwSaoTv5qq1jKwgBTKd1y9RKUzz89n86Z4UBv7Q51o=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
installShellFiles
|
|
pandoc
|
|
];
|
|
|
|
build-system = with python3.pkgs; [
|
|
setuptools
|
|
];
|
|
|
|
dependencies = with python3.pkgs; [
|
|
click
|
|
];
|
|
|
|
makeWrapperArgs = [
|
|
"--prefix"
|
|
"PATH"
|
|
":"
|
|
"${lib.makeBinPath [ apksigner ]}"
|
|
];
|
|
|
|
postPatch = ''
|
|
substituteInPlace Makefile \
|
|
--replace-fail /bin/bash ${bash}/bin/bash
|
|
'';
|
|
|
|
postBuild = ''
|
|
make ${pname}.1
|
|
'';
|
|
|
|
postInstall = ''
|
|
installManPage ${pname}.1
|
|
'';
|
|
|
|
doInstallCheck = true;
|
|
|
|
installCheckPhase = ''
|
|
runHook preInstallCheck
|
|
$out/bin/apksigcopier --version | grep "${version}"
|
|
runHook postInstallCheck
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Copy/extract/patch android apk signatures & compare APKs";
|
|
mainProgram = "apksigcopier";
|
|
longDescription = ''
|
|
apksigcopier is a tool for copying android APK signatures from a signed
|
|
APK to an unsigned one (in order to verify reproducible builds).
|
|
It can also be used to compare two APKs with different signatures.
|
|
Its command-line tool offers four operations:
|
|
|
|
* copy signatures directly from a signed to an unsigned APK
|
|
* extract signatures from a signed APK to a directory
|
|
* patch previously extracted signatures onto an unsigned APK
|
|
* compare two APKs with different signatures (requires apksigner)
|
|
'';
|
|
homepage = "https://github.com/obfusk/apksigcopier";
|
|
license = with licenses; [ gpl3Plus ];
|
|
maintainers = with maintainers; [ obfusk ];
|
|
};
|
|
}
|