mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 14:11:36 +00:00
Merge pull request #131258 from obfusk/apksigner
apksigner: for apksigcopier, diffoscope, fdroidserver
This commit is contained in:
commit
077da41b40
|
@ -4,10 +4,9 @@
|
|||
, installShellFiles
|
||||
, bash
|
||||
, pandoc
|
||||
, apksigner
|
||||
}:
|
||||
|
||||
# FIXME: how to "recommend" apksigner like the Debian package?
|
||||
|
||||
python3.pkgs.buildPythonApplication rec {
|
||||
pname = "apksigcopier";
|
||||
version = "1.0.1";
|
||||
|
@ -22,6 +21,7 @@ python3.pkgs.buildPythonApplication rec {
|
|||
nativeBuildInputs = [ installShellFiles pandoc ];
|
||||
propagatedBuildInputs = with python3.pkgs; [ click ];
|
||||
checkInputs = with python3.pkgs; [ flake8 mypy pylint ];
|
||||
makeWrapperArgs = [ "--prefix" "PATH" ":" "${lib.makeBinPath [ apksigner ]}" ];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace Makefile \
|
||||
|
|
15
pkgs/development/tools/apksigner/default.nix
Normal file
15
pkgs/development/tools/apksigner/default.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
{ runCommand
|
||||
, makeWrapper
|
||||
, jre
|
||||
, build-tools
|
||||
}:
|
||||
let
|
||||
tools = builtins.head build-tools;
|
||||
in
|
||||
runCommand "apksigner" {
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
} ''
|
||||
mkdir -p $out/bin
|
||||
makeWrapper "${jre}/bin/java" "$out/bin/apksigner" \
|
||||
--add-flags "-jar ${tools}/libexec/android-sdk/build-tools/${tools.version}/lib/apksigner.jar"
|
||||
''
|
|
@ -1,7 +1,8 @@
|
|||
{ docker
|
||||
, fetchFromGitLab
|
||||
{ fetchFromGitLab
|
||||
, python
|
||||
, lib }:
|
||||
, lib
|
||||
, apksigner
|
||||
}:
|
||||
|
||||
python.pkgs.buildPythonApplication rec {
|
||||
version = "2.0.3";
|
||||
|
@ -47,6 +48,8 @@ python.pkgs.buildPythonApplication rec {
|
|||
yamllint
|
||||
];
|
||||
|
||||
makeWrapperArgs = [ "--prefix" "PATH" ":" "${lib.makeBinPath [ apksigner ]}" ];
|
||||
|
||||
# no tests
|
||||
doCheck = false;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{ lib, stdenv, fetchurl, runCommand, makeWrapper, python3Packages, docutils, help2man, installShellFiles
|
||||
, abootimg, acl, apktool, binutils-unwrapped, build-tools, bzip2, cbfstool, cdrkit, colord, colordiff, coreutils, cpio, db, diffutils, dtc
|
||||
{ lib, stdenv, fetchurl, python3Packages, docutils, help2man, installShellFiles
|
||||
, abootimg, acl, apksigner, apktool, binutils-unwrapped, bzip2, cbfstool, cdrkit, colord, colordiff, coreutils, cpio, db, diffutils, dtc
|
||||
, e2fsprogs, file, findutils, fontforge-fonttools, ffmpeg, fpc, gettext, ghc, ghostscriptX, giflib, gnumeric, gnupg, gnutar
|
||||
, gzip, hdf5, imagemagick, jdk, libarchive, libcaca, llvm, lz4, mono, openssh, openssl, pdftk, pgpdump, poppler_utils, qemu, R
|
||||
, radare2, sng, sqlite, squashfsTools, tcpdump, odt2txt, unzip, wabt, xxd, xz, zip, zstd
|
||||
|
@ -7,13 +7,6 @@
|
|||
}:
|
||||
|
||||
# Note: when upgrading this package, please run the list-missing-tools.sh script as described below!
|
||||
let
|
||||
apksigner = runCommand "apksigner" { nativeBuildInputs = [ makeWrapper ]; } ''
|
||||
mkdir -p $out/bin
|
||||
makeWrapper "${jdk}/bin/java" "$out/bin/apksigner" \
|
||||
--add-flags "-jar ${builtins.head build-tools}/libexec/android-sdk/build-tools/28.0.3/lib/apksigner.jar"
|
||||
'';
|
||||
in
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "diffoscope";
|
||||
version = "178";
|
||||
|
|
|
@ -1105,6 +1105,10 @@ in
|
|||
|
||||
apksigcopier = callPackage ../development/tools/apksigcopier { };
|
||||
|
||||
apksigner = callPackage ../development/tools/apksigner {
|
||||
inherit (androidenv.androidPkgs_9_0) build-tools;
|
||||
};
|
||||
|
||||
apktool = callPackage ../development/tools/apktool {
|
||||
inherit (androidenv.androidPkgs_9_0) build-tools;
|
||||
};
|
||||
|
@ -4200,7 +4204,6 @@ in
|
|||
diff-so-fancy = callPackage ../applications/version-management/git-and-tools/diff-so-fancy { };
|
||||
|
||||
diffoscopeMinimal = callPackage ../tools/misc/diffoscope {
|
||||
inherit (androidenv.androidPkgs_9_0) build-tools;
|
||||
jdk = jdk8;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue