nixpkgs/pkgs/development/tools/apksigner/default.nix

16 lines
340 B
Nix
Raw Normal View History

2021-07-24 20:23:59 +00:00
{ 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"
''