Merge pull request #169817 from fabaff/apksigcopier-fix
apksigcopier: remove linting, use installCheckPhase
This commit is contained in:
commit
6b3c40c44d
1 changed files with 33 additions and 18 deletions
|
@ -1,10 +1,10 @@
|
||||||
{ lib
|
{ lib
|
||||||
, fetchFromGitHub
|
|
||||||
, python3
|
|
||||||
, installShellFiles
|
|
||||||
, bash
|
|
||||||
, pandoc
|
|
||||||
, apksigner
|
, apksigner
|
||||||
|
, bash
|
||||||
|
, fetchFromGitHub
|
||||||
|
, installShellFiles
|
||||||
|
, pandoc
|
||||||
|
, python3
|
||||||
}:
|
}:
|
||||||
|
|
||||||
python3.pkgs.buildPythonApplication rec {
|
python3.pkgs.buildPythonApplication rec {
|
||||||
|
@ -18,33 +18,48 @@ python3.pkgs.buildPythonApplication rec {
|
||||||
sha256 = "07ldq3q1x2lpb15q5s5i1pbg89sn6ah45amskm9pndqlh16z9k2x";
|
sha256 = "07ldq3q1x2lpb15q5s5i1pbg89sn6ah45amskm9pndqlh16z9k2x";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ installShellFiles pandoc ];
|
nativeBuildInputs = [
|
||||||
propagatedBuildInputs = with python3.pkgs; [ click ];
|
installShellFiles
|
||||||
checkInputs = with python3.pkgs; [ flake8 mypy pylint ];
|
pandoc
|
||||||
makeWrapperArgs = [ "--prefix" "PATH" ":" "${lib.makeBinPath [ apksigner ]}" ];
|
];
|
||||||
|
|
||||||
|
propagatedBuildInputs = with python3.pkgs; [
|
||||||
|
click
|
||||||
|
];
|
||||||
|
|
||||||
|
makeWrapperArgs = [
|
||||||
|
"--prefix"
|
||||||
|
"PATH"
|
||||||
|
":"
|
||||||
|
"${lib.makeBinPath [ apksigner ]}"
|
||||||
|
];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace Makefile \
|
substituteInPlace Makefile \
|
||||||
--replace /bin/bash ${bash}/bin/bash \
|
--replace /bin/bash ${bash}/bin/bash
|
||||||
--replace 'apksigcopier --version' '${python3.interpreter} apksigcopier --version'
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postBuild = ''
|
postBuild = ''
|
||||||
make ${pname}.1
|
make ${pname}.1
|
||||||
'';
|
'';
|
||||||
|
|
||||||
checkPhase = ''
|
|
||||||
make test
|
|
||||||
'';
|
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
installManPage ${pname}.1
|
installManPage ${pname}.1
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
doInstallCheck = true;
|
||||||
|
|
||||||
|
installCheckPhase = ''
|
||||||
|
runHook preInstallCheck
|
||||||
|
$out/bin/apksigcopier --version | grep "${version}"
|
||||||
|
runHook postInstallCheck
|
||||||
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Copy/extract/patch android apk signatures & compare apks";
|
description = "Copy/extract/patch android apk signatures & compare APKs";
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
apksigcopier is a tool for copying android APK signatures from a signed APK to an unsigned one (in order to verify reproducible builds).
|
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.
|
It can also be used to compare two APKs with different signatures.
|
||||||
Its command-line tool offers four operations:
|
Its command-line tool offers four operations:
|
||||||
|
|
||||||
|
@ -55,6 +70,6 @@ python3.pkgs.buildPythonApplication rec {
|
||||||
'';
|
'';
|
||||||
homepage = "https://github.com/obfusk/apksigcopier";
|
homepage = "https://github.com/obfusk/apksigcopier";
|
||||||
license = with licenses; [ gpl3Plus ];
|
license = with licenses; [ gpl3Plus ];
|
||||||
maintainers = [ maintainers.obfusk ];
|
maintainers = with maintainers; [ obfusk ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue