nixpkgs/pkgs/development/compilers/closure/default.nix
R. RyanTM 5de1823199 closurecompiler: 20180319 -> 20180402
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/gvch7ph5qinav24mdlb48b3lk833aiaf-closure-compiler-20180402/bin/closure-compiler --help’ got 0 exit code
- found 20180402 with grep in /nix/store/gvch7ph5qinav24mdlb48b3lk833aiaf-closure-compiler-20180402
- directory tree listing: https://gist.github.com/2858ac6d2346b885778eb695553956a0
2018-04-20 07:10:42 -07:00

30 lines
880 B
Nix

{ stdenv, fetchurl, jre, makeWrapper }:
stdenv.mkDerivation rec {
name = "closure-compiler-${version}";
version = "20180402";
src = fetchurl {
url = "https://dl.google.com/closure-compiler/compiler-${version}.tar.gz";
sha256 = "1xbr2wvppzhq189z9m70zqry2a3hh6cdydwbc1jm2z7imsg1i6c1";
};
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;
};
}