forked from digital-asset/daml
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add google-java-format to devenv as javafmt (digital-asset#8687)
Add the https://github.com/google/google-java-format code formatting tool to dev-env. Uses the name javafmt to call it, to mirror scalafmt. Making it part of our checks will be done in a follow-up PR to make this easy to review. changelog_begin changelog_end
- Loading branch information
1 parent
69b28d2
commit 8ec9bc7
Showing
3 changed files
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../lib/dade-exec-nix-tool |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ stdenv, fetchurl, jdk11, pkgs }: | ||
|
||
let version = "1.9"; in | ||
stdenv.mkDerivation rec { | ||
buildInputs = [ pkgs.makeWrapper ]; | ||
name = "google-java-format"; | ||
dontUnpack = true; | ||
src = fetchurl { | ||
url = "https://github.com/google/${name}/releases/download/${name}-${version}/${name}-${version}-all-deps.jar"; | ||
sha256 = "1d98720a5984de85a822aa32a378eeacd4d17480d31cba6e730caae313466b97"; | ||
}; | ||
installPhase = '' | ||
mkdir -pv $out/share/java $out/bin | ||
cp ${src} $out/share/java/${name}-${version}.jar | ||
makeWrapper ${jdk11}/bin/java $out/bin/javafmt --add-flags "-jar $out/share/java/${name}-${version}.jar" | ||
''; | ||
} |