3
0
Fork 0
forked from mirrors/nixpkgs

google-java-format: init at 1.11.0

This commit is contained in:
Jon Roberts 2021-09-29 15:45:23 -05:00
parent e4f1de1343
commit c5ea68e6b9
3 changed files with 47 additions and 0 deletions

View file

@ -3251,6 +3251,12 @@
githubId = 13485450;
name = "Emmanuel Rosa";
};
emptyflask = {
email = "jon@emptyflask.dev";
github = "emptyflask";
githubId = 28287;
name = "Jon Roberts";
};
endgame = {
email = "jack@jackkelly.name";
github = "endgame";

View file

@ -0,0 +1,39 @@
{ lib, stdenv, fetchurl, jre, makeWrapper }:
stdenv.mkDerivation rec {
pname = "google-java-format";
version = "1.11.0";
src = fetchurl {
url = "https://github.com/google/google-java-format/releases/download/v${version}/google-java-format-${version}-all-deps.jar";
sha256 = "1ixpg8ljg819fq94mxyypknmslva3rkifphbnq3ic71b7iip6lia";
};
dontUnpack = true;
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ jre ];
installPhase = ''
runHook preInstall
mkdir -p $out/{bin,share/google-java-format}
install -D ${src} $out/share/google-java-format/google-java-format.jar
makeWrapper ${jre}/bin/java $out/bin/google-java-format \
--add-flags "-jar $out/share/google-java-format/google-java-format.jar"
runHook postInstall
'';
meta = with lib; {
description = "Java source formatter by Google";
longDescription = ''
A program that reformats Java source code to comply with Google Java Style.
'';
homepage = "https://github.com/google/google-java-format";
license = licenses.asl20;
maintainers = [ maintainers.emptyflask ];
platforms = platforms.all;
};
}

View file

@ -5677,6 +5677,8 @@ with pkgs;
google-cloud-cpp = callPackage ../development/libraries/google-cloud-cpp { };
google-java-format = callPackage ../development/tools/google-java-format { };
gdown = with python3Packages; toPythonApplication gdown;
gopro = callPackage ../tools/video/gopro { };