nixpkgs/pkgs/development/tools/bundletool/default.nix
stuebinm ff1a94e523 treewide: add meta.mainProgram to packages with a single binary
The nixpkgs-unstable channel's programs.sqlite was used to identify
packages producing exactly one binary, and these automatically added
to their package definitions wherever possible.
2024-03-19 03:14:51 +01:00

33 lines
1.0 KiB
Nix

{ lib, stdenvNoCC, fetchurl, makeBinaryWrapper, jre_headless }:
stdenvNoCC.mkDerivation rec {
pname = "bundletool";
version = "1.15.6";
src = fetchurl {
url = "https://github.com/google/bundletool/releases/download/${version}/bundletool-all-${version}.jar";
sha256 = "sha256-OK6KELzazvB+zOghEYjFySs3a+lto4/z7h8s9IlbLLg=";
};
dontUnpack = true;
nativeBuildInputs = [ makeBinaryWrapper ];
installPhase = ''
runHook preInstall
makeWrapper ${jre_headless}/bin/java $out/bin/bundletool --add-flags "-jar $src"
runHook postInstall
'';
meta = with lib; {
description = "Command-line tool to manipulate Android App Bundles";
mainProgram = "bundletool";
homepage = "https://developer.android.com/studio/command-line/bundletool";
changelog = "https://github.com/google/bundletool/releases/tag/${version}";
sourceProvenance = with sourceTypes; [ binaryBytecode ];
maintainers = with maintainers; [ marsam ];
platforms = jre_headless.meta.platforms;
license = licenses.asl20;
};
}