2017-09-26 23:19:56 +01:00
|
|
|
{ stdenv, fetchurl, jre, makeWrapper }:
|
2013-07-01 13:52:57 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "closure-compiler";
|
2019-09-26 09:33:23 +01:00
|
|
|
version = "20190909";
|
2013-07-01 13:52:57 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2017-09-26 23:19:56 +01:00
|
|
|
url = "https://dl.google.com/closure-compiler/compiler-${version}.tar.gz";
|
2019-09-26 09:33:23 +01:00
|
|
|
sha256 = "0km45pz19dz1hi8vjj290hyxdhr379iixmml0rs8crr4gvs3685w";
|
2013-07-01 13:52:57 +01:00
|
|
|
};
|
|
|
|
|
2017-09-26 23:19:56 +01:00
|
|
|
sourceRoot = ".";
|
2013-07-01 13:52:57 +01:00
|
|
|
|
2017-09-26 23:19:56 +01:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildInputs = [ jre ];
|
2013-07-01 13:52:57 +01:00
|
|
|
|
|
|
|
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"
|
2013-07-01 13:52:57 +01:00
|
|
|
'';
|
|
|
|
|
2017-09-26 23:19:56 +01:00
|
|
|
meta = with stdenv.lib; {
|
2013-07-01 13:52:57 +01:00
|
|
|
description = "A tool for making JavaScript download and run faster";
|
|
|
|
homepage = https://developers.google.com/closure/compiler/;
|
2017-09-26 23:19:56 +01:00
|
|
|
license = licenses.asl20;
|
|
|
|
platforms = platforms.all;
|
2013-07-01 13:52:57 +01:00
|
|
|
};
|
|
|
|
}
|