about summary refs log tree commit diff
path: root/pkgs/development/tools/apksigcopier
diff options
context:
space:
mode:
authorFabian Affolter <mail@fabian-affolter.ch>2022-04-22 17:58:43 +0200
committerFabian Affolter <mail@fabian-affolter.ch>2022-04-22 17:58:43 +0200
commit28e8501d8e67d08892db837b1238fedf54c6eb0a (patch)
tree72d636bace82456b08582e47024fc61ad0033ed5 /pkgs/development/tools/apksigcopier
parenteed65357919870061fba1fb6a70756041903f42b (diff)
apksigcopier: remove linting, use installCheckPhase
Diffstat (limited to 'pkgs/development/tools/apksigcopier')
-rw-r--r--pkgs/development/tools/apksigcopier/default.nix47
1 files changed, 31 insertions, 16 deletions
diff --git a/pkgs/development/tools/apksigcopier/default.nix b/pkgs/development/tools/apksigcopier/default.nix
index cc23081473af6..f8747398c2229 100644
--- a/pkgs/development/tools/apksigcopier/default.nix
+++ b/pkgs/development/tools/apksigcopier/default.nix
@@ -1,10 +1,10 @@
 { lib
+, apksigner
+, bash
 , fetchFromGitHub
-, python3
 , installShellFiles
-, bash
 , pandoc
-, apksigner
+, python3
 }:
 
 python3.pkgs.buildPythonApplication rec {
@@ -18,33 +18,48 @@ python3.pkgs.buildPythonApplication rec {
     sha256 = "07ldq3q1x2lpb15q5s5i1pbg89sn6ah45amskm9pndqlh16z9k2x";
   };
 
-  nativeBuildInputs = [ installShellFiles pandoc ];
-  propagatedBuildInputs = with python3.pkgs; [ click ];
-  checkInputs = with python3.pkgs; [ flake8 mypy pylint ];
-  makeWrapperArgs = [ "--prefix" "PATH" ":" "${lib.makeBinPath [ apksigner ]}" ];
+  nativeBuildInputs = [
+    installShellFiles
+    pandoc
+  ];
+
+  propagatedBuildInputs = with python3.pkgs; [
+    click
+  ];
+
+  makeWrapperArgs = [
+    "--prefix"
+    "PATH"
+    ":"
+    "${lib.makeBinPath [ apksigner ]}"
+  ];
 
   postPatch = ''
     substituteInPlace Makefile \
-      --replace /bin/bash ${bash}/bin/bash \
-      --replace 'apksigcopier --version' '${python3.interpreter} apksigcopier --version'
+      --replace /bin/bash ${bash}/bin/bash
   '';
 
   postBuild = ''
     make ${pname}.1
   '';
 
-  checkPhase = ''
-    make test
-  '';
-
   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";
+    description = "Copy/extract/patch android apk signatures & compare APKs";
     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.
       Its command-line tool offers four operations:
 
@@ -55,6 +70,6 @@ python3.pkgs.buildPythonApplication rec {
     '';
     homepage = "https://github.com/obfusk/apksigcopier";
     license = with licenses; [ gpl3Plus ];
-    maintainers = [ maintainers.obfusk ];
+    maintainers = with maintainers; [ obfusk ];
   };
 }