Merge pull request #29823 from yegortimoshenko/closure-compiler/20170910

closure-compiler: 20170218 -> 20170910
This commit is contained in:
Peter Hoeg 2017-09-30 11:06:26 +08:00 committed by GitHub
commit 0bf3f4bbe7

View file

@ -1,31 +1,30 @@
{ stdenv, fetchurl, jre, gnutar, bash }: { stdenv, fetchurl, jre, makeWrapper }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "closure-compiler-${version}"; name = "closure-compiler-${version}";
version = "20170218"; version = "20170910";
src = fetchurl { src = fetchurl {
url = "http://dl.google.com/closure-compiler/compiler-${version}.tar.gz"; url = "https://dl.google.com/closure-compiler/compiler-${version}.tar.gz";
sha256 = "06snabmpy07x4xm8d1xgq5dfzbjli10xkxk3nx9jms39zkj493cd"; sha256 = "0znzsks8ql9qajhcjzfkhmnpz8zs6b8cji04fhivyq973jpxxrak";
}; };
phases = [ "installPhase" ]; sourceRoot = ".";
buildInputs = [ gnutar ]; nativeBuildInputs = [ makeWrapper ];
buildInputs = [ jre ];
installPhase = '' installPhase = ''
mkdir -p $out/share/java $out/bin mkdir -p $out/share/java $out/bin
tar -xzf $src cp closure-compiler-v${version}.jar $out/share/java
cp -r closure-compiler-v${version}.jar $out/share/java/ makeWrapper ${jre}/bin/java $out/bin/closure-compiler \
echo "#!${bash}/bin/bash" > $out/bin/closure-compiler --add-flags "-jar $out/share/java/closure-compiler-v${version}.jar"
echo "${jre}/bin/java -jar $out/share/java/closure-compiler-v${version}.jar \"\$@\"" >> $out/bin/closure-compiler
chmod +x $out/bin/closure-compiler
''; '';
meta = { meta = with stdenv.lib; {
description = "A tool for making JavaScript download and run faster"; description = "A tool for making JavaScript download and run faster";
homepage = https://developers.google.com/closure/compiler/; homepage = https://developers.google.com/closure/compiler/;
license = stdenv.lib.licenses.asl20; license = licenses.asl20;
platforms = stdenv.lib.platforms.unix; platforms = platforms.all;
}; };
} }