a8cceae603
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/5cwv2kws2j74bchi3gd1fknaxglrplmi-closure-compiler-20180319/bin/closure-compiler --help` got 0 exit code - ran `/nix/store/5cwv2kws2j74bchi3gd1fknaxglrplmi-closure-compiler-20180319/bin/closure-compiler --version` and found version 20180319 - found 20180319 with grep in /nix/store/5cwv2kws2j74bchi3gd1fknaxglrplmi-closure-compiler-20180319 - found 20180319 in filename of file in /nix/store/5cwv2kws2j74bchi3gd1fknaxglrplmi-closure-compiler-20180319 - directory tree listing: https://gist.github.com/f4c40a73ba5b7b3b9eeb7c65db12a641
31 lines
880 B
Nix
31 lines
880 B
Nix
{ stdenv, fetchurl, jre, makeWrapper }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = "closure-compiler-${version}";
|
|
version = "20180319";
|
|
|
|
src = fetchurl {
|
|
url = "https://dl.google.com/closure-compiler/compiler-${version}.tar.gz";
|
|
sha256 = "181cskxamq9vkrmb2c78v6hpknrzzp49vkzp53r9pisf5j0p7220";
|
|
};
|
|
|
|
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;
|
|
};
|
|
}
|