Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / tools / bundletool / default.nix
blob56c3a72ea7f14d2783cb8e8d6c0950352b0c88d6
1 { lib, stdenvNoCC, fetchurl, makeBinaryWrapper, jre_headless }:
3 stdenvNoCC.mkDerivation rec {
4   pname = "bundletool";
5   version = "1.15.6";
7   src = fetchurl {
8     url = "https://github.com/google/bundletool/releases/download/${version}/bundletool-all-${version}.jar";
9     sha256 = "sha256-OK6KELzazvB+zOghEYjFySs3a+lto4/z7h8s9IlbLLg=";
10   };
12   dontUnpack = true;
14   nativeBuildInputs = [ makeBinaryWrapper ];
16   installPhase = ''
17     runHook preInstall
18     makeWrapper ${jre_headless}/bin/java $out/bin/bundletool --add-flags "-jar $src"
19     runHook postInstall
20   '';
22   meta = with lib; {
23     description = "Command-line tool to manipulate Android App Bundles";
24     homepage = "https://developer.android.com/studio/command-line/bundletool";
25     changelog = "https://github.com/google/bundletool/releases/tag/${version}";
26     sourceProvenance = with sourceTypes; [ binaryBytecode ];
27     maintainers = with maintainers; [ marsam ];
28     platforms = jre_headless.meta.platforms;
29     license = licenses.asl20;
30   };