nixpkgs/pkgs/development/compilers/closure/default.nix
R. RyanTM 6e515fea7e closurecompiler: 20181125 -> 20181210
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
2019-01-03 19:44:17 -08:00

30 lines
880 B
Nix

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