nixpkgs/pkgs/development/compilers/closure/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

31 lines
910 B
Nix
Raw Normal View History

{ lib, stdenv, fetchurl, jre, makeWrapper }:
stdenv.mkDerivation rec {
pname = "closure-compiler";
2022-02-11 00:54:37 +00:00
version = "20220202";
src = fetchurl {
url = "mirror://maven/com/google/javascript/closure-compiler/v${version}/closure-compiler-v${version}.jar";
2022-02-11 00:54:37 +00:00
sha256 = "sha256-I9kcK9oL6AMStI7eGfruJ+CYQuAsVsixTzkh0JWJrw8=";
};
2021-08-18 20:40:40 +00:00
dontUnpack = true;
2017-09-26 22:19:56 +00:00
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ jre ];
installPhase = ''
2014-01-09 12:01:38 +00:00
mkdir -p $out/share/java $out/bin
2021-08-18 20:40:40 +00:00
cp ${src} $out/share/java/closure-compiler-v${version}.jar
2017-09-26 22:19:56 +00:00
makeWrapper ${jre}/bin/java $out/bin/closure-compiler \
--add-flags "-jar $out/share/java/closure-compiler-v${version}.jar"
'';
meta = with lib; {
description = "A tool for making JavaScript download and run faster";
2020-03-04 18:56:56 +00:00
homepage = "https://developers.google.com/closure/compiler/";
2017-09-26 22:19:56 +00:00
license = licenses.asl20;
platforms = platforms.all;
};
}