3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/compilers/closure/default.nix

31 lines
870 B
Nix
Raw Normal View History

{ lib, stdenv, fetchurl, jre, makeWrapper }:
stdenv.mkDerivation rec {
pname = "closure-compiler";
2020-07-31 21:56:25 +01:00
version = "20200719";
src = fetchurl {
2017-09-26 23:19:56 +01:00
url = "https://dl.google.com/closure-compiler/compiler-${version}.tar.gz";
2020-07-31 21:56:25 +01:00
sha256 = "18095i98mk5kc1vpaf6gvmvhiyl2x4zrcwd7ix5l98jydldiz7wx";
};
2017-09-26 23:19:56 +01:00
sourceRoot = ".";
2017-09-26 23:19:56 +01:00
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ jre ];
installPhase = ''
2014-01-09 12:01:38 +00:00
mkdir -p $out/share/java $out/bin
2017-09-26 23:19:56 +01:00
cp closure-compiler-v${version}.jar $out/share/java
makeWrapper ${jre}/bin/java $out/bin/closure-compiler \
--add-flags "-jar $out/share/java/closure-compiler-v${version}.jar"
'';
meta = with lib; {
description = "A tool for making JavaScript download and run faster";
2020-03-04 18:56:56 +00:00
homepage = "https://developers.google.com/closure/compiler/";
2017-09-26 23:19:56 +01:00
license = licenses.asl20;
platforms = platforms.all;
};
}