3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/compilers/closure/default.nix
R. RyanTM 9cf4d541de closurecompiler: 20180402 -> 20180506
Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools.

This update was made based on information from https://repology.org/metapackage/closure-compiler/versions.

These checks were done:

- built on NixOS
- ran ‘/nix/store/qh5lv1f6c84mvndiivba30y3n3whw82j-closure-compiler-20180506/bin/closure-compiler --help’ got 0 exit code
- found 20180506 with grep in /nix/store/qh5lv1f6c84mvndiivba30y3n3whw82j-closure-compiler-20180506
- directory tree listing: https://gist.github.com/9013b4a27653c964fee876223f0b579b
2018-05-12 15:16:17 +02:00

31 lines
880 B
Nix

{ stdenv, fetchurl, jre, makeWrapper }:
stdenv.mkDerivation rec {
name = "closure-compiler-${version}";
version = "20180506";
src = fetchurl {
url = "https://dl.google.com/closure-compiler/compiler-${version}.tar.gz";
sha256 = "10w9vs61fs14k8g3wlng0ifj0knfm0xfc4rsnd2c75464hkdxvr9";
};
sourceRoot = ".";
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ jre ];
installPhase = ''
mkdir -p $out/share/java $out/bin
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 stdenv.lib; {
description = "A tool for making JavaScript download and run faster";
homepage = https://developers.google.com/closure/compiler/;
license = licenses.asl20;
platforms = platforms.all;
};
}