Merge pull request #139964 from emptyflask/google-java-format
This commit is contained in:
commit
183f4d244c
@ -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";
|
||||
|
39
pkgs/development/tools/google-java-format/default.nix
Normal file
39
pkgs/development/tools/google-java-format/default.nix
Normal 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;
|
||||
};
|
||||
}
|
@ -5681,6 +5681,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 { };
|
||||
|
Loading…
Reference in New Issue
Block a user